WP Photo Album Plus - Version 6.8.04

Version Description

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.

=

Download this release

Release Info

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

Code changes from version 6.8.03 to 6.8.04

changelog.txt ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ WP Photo Album Plus Changelog
2
+
3
+ = 6.8.04 =
4
+
5
+ = Bug Fixes =
6
+
7
+ * Album navigator widget: fixed a layout issue for themes that have a background image on list items.
8
+ * Under some circumstances 'Granted albums' were created, while there was no valid parent(s) specification.
9
+ * Table IV-G3.1 initially shows ---none--- but is in fact 300ms. Fixed.
10
+
11
+ = New Features =
12
+
13
+ * Table VIII-13.1 and Table VIII-14.1 to schedule the regeneration of crypto codes on a regular basis.
14
+
15
+ = Other Changes =
16
+
17
+ * Bestof images in the box-version are now displayed like default thumbnails so the horizontal placement now behaves responsive.
18
+ The height shortcode attribute is now treated as the maximum for the width and the height.
19
+ * Corrected and enhanced the explanationbox on the Photo Albums -> Upload Photos admin page.
20
+ * Improved lightbox performance (speed).
21
+ * Added a few locations where the cache will be cleared.
22
+
23
+ = 6.8.03 =
24
+
25
+ = Bug Fixes =
26
+
27
+ * Due to a left-over from testing, switching to flat album table did no longer work. Fixed.
28
+ * On the album admin page: if the album is full, two - inactive - upload/import buttons were displayed. Fixed.
29
+ * On the photo admin screen: the caption of the exif table was not translatable. Fixed.
30
+
31
+ = New Features =
32
+
33
+ * You can keep a history log of the photo of the day. See the photo of the day admin page. It will show up at the admin dashboard.
34
+
35
+ = Other Changes =
36
+
37
+ * If the default photo description (Table IX-D5) contains HTML code, it will no longer be shown on the frontend upload dialog.
38
+ * Wppa will no longer crash the sites admin at activation time when the PHP EXIF functions are not activated.
39
+
40
+ = 6.8.02 =
41
+
42
+ = Bug Fixes =
43
+
44
+ * Sourcefiles got erroneoulsy removed in certain circumstances.
45
+ This happened when there were two or more photos with the same name in an album and one got deleted.
46
+ This also happened when a photo was deleted and re-uploaded before the background process actually removed the files of the deleted photo.
47
+ This issue has been fixed.
48
+ * w#hrurl and w#pl in photo descriptions got wrong results when the filename contained spaces or brackets. Fixed.
49
+ * Fixes for compatibility with plugin Simple Cart & By Now. This plugin is not maintained for over three years.
50
+ If you update to wppa version 6.8.02 and use SCABN, you MUST install the special - fixed - version to maintain compatibility.
51
+
52
+ = New Features =
53
+
54
+ * Table VII-B4: Fe limts per album. If this box is ticked, the upload limits set for userroles apply to each album individually where the user has frontend oploads to.
55
+ * You can now add browser specific css. Table IV-A15.x.
56
+ * If the user has the right to import, there is a button on the album admin screen to import to the album, like the upload to this album button.
57
+ * Added links to upload and import pages on the album admin main page, dependant of user rights.
58
+
59
+ = Other Changes =
60
+
61
+ * On most installations you will no longer see failed uploads due to memory limitations.
62
+ When there is not enough memory to downsize photos or to apply watermarks, downsizing will be skipped.
63
+ Note that in those cases one can have copies of the original photofiles as thumbnail images.
64
+ If this happens often, it is rcommended to set an upload size limit in Table VII-B10.2 to force users to upload smaller images,
65
+ or to ask the hosting provider to increase the available sever memory.
66
+ * Created a fixed version of plugin Simple Cart & Buy Now. You will need this special version if you previously used Simple Cart & Buy Now in combination with wppa.
67
+ Download it <a href="https://wppa.nl/wp-content/uploads/simple-cart-buy-now-for-wppa.zip" >here</a>
68
+
69
+ = 6.8.01 =
70
+
71
+ = Bug Fixes =
72
+
73
+ * Fixed layout issues of the album navigator widget and the album / photo admin pages.
74
+
75
+ = New Features =
76
+
77
+ * GPS and File tags are now supported in the exif system.
78
+
79
+ = Other Changes =
80
+
81
+ * Added to the bestof widget: A checkbox to display the sum of the ratings (totvalue), and the option to sort by the sum of the ratings.
82
+ * Bestof shortcode now also supports the display of the sum of the ratings (totvalue="yes"), and the sort option to sort by the sum of the ratings (sortby="totvalue").
83
+ The full shortcode is now: [wppa type="bestof" page="nn" count="nn" display="photo|owner" period="thisweek|lastweek|lastmonth|thismonth|lastyear|thisyear" sortby="maxratingcount|meanrating|ratingcount|totvalue" maxratings="yes|no" meanrat="yes|no" ratcount="yes|no" totvalue="no|yes" linktype="none|owneralbums|ownerphotos|upldrphotos" fontsize="nn" lineheight="nn" height="nn"][/wppa]
84
+ Note: For backward compatibility: the default for displaying the total value is no (totvalue="no") as opposed to the other display options.
85
+ * Exif arrays are now stored as arrays as opposed to multiple items with the same tag id. This enables interpretation and formatting of array value tags.
86
+ * Improved display of help text in settings and photo of the day settings admin pages.
87
+ * Removed obsolete browser specific css.
88
+ * Improved layout and behaviour of frontend upload dialog.
89
+
90
+ = 6.8.00 =
91
+
92
+ = Bug Fixes =
93
+
94
+ * Various minor fixes for PHP 7.2 compatibility.
95
+ * If the visitor does not have the rights to edit a photo at the front-end, there will not be a link or button to the edit page.
96
+ * On the Import and Upload Photos admin pages one can now select a target album even when there are more albums than the setting in Table IX-B6.3.
97
+ * The most recently uploaded photo had its viewcount bumped for every session when the [photo] shortcode was enabled. Fixed.
98
+ * If you use qr codes and cache them (See Table IX-K1.4), the cache will be cleared regularly to prvent the generation of too many files.
99
+
100
+ = New Features =
101
+
102
+ * On the Album Admin -> Edit screen: the photo information now also shows the EXIF data, if available.
103
+ * Shortcode [photo xxx] can now have 'random' as argument, e.g.: [photo random]. See Table IX-L for details.
104
+ * On the shortcode generator, one can optionally select one or more albums for the upload box.
105
+
106
+ = Other Changes =
107
+
108
+ * Supersearch. Selection boxes are now sorted, exif values are formatted.
109
+ Certain camera brand specific tags are now recognized and (partially) correct formatted.
110
+ * Further improved formatting of various exif tags.
111
+
112
+ = For more information about older versions: see https://wppa.nl/changelog/
js/wppa-lightbox.js CHANGED
@@ -43,7 +43,7 @@ function wppaDoOnOrientationChange( e ) {
43
 
44
  // Full screen and still in?
45
  if ( wppaOvlMode != 'normal' && document.getElementById( 'wppa-overlay-img' ) ) {
46
- setTimeout( 'wppaOvlShow( ' + wppaOvlIdx + ' )', 100 );
47
  return;
48
  }
49
  }
@@ -139,7 +139,7 @@ wppaConsoleLog( 'wppaOvlFull' );
139
  } else if ( elem.webkitRequestFullscreen ) {
140
  elem.webkitRequestFullscreen();
141
  }
142
- setTimeout( function(){wppaOvlShow( wppaOvlIdx )}, 500 );
143
  }
144
 
145
  // Cancel fullscreen. This is browser dependant
@@ -153,7 +153,7 @@ wppaConsoleLog( 'wppaOvlFull' );
153
  }
154
  }
155
 
156
- setTimeout( function(){wppaShowFsButtons(0.75)}, 300 );
157
 
158
  // Remove legenda
159
  jQuery( '#wppa-ovl-legenda-1' ).html( '' );
@@ -182,9 +182,9 @@ wppaConsoleLog( 'wppaOvlNorm' );
182
  return;
183
  }
184
 
185
- setTimeout( function(){wppaShowFsButtons(0.75)}, 300 );
186
 
187
- setTimeout( function(){wppaOvlShow(wppaOvlIdx)}, 500 );
188
  }
189
 
190
  // Prepare the display of the lightbox overlay.
@@ -312,7 +312,7 @@ wppaConsoleLog( 'wppaOvlShow arg=' + arg );
312
  }
313
 
314
  // Now start the actual function
315
- setTimeout( function(){ _wppaOvlShow( wppaOvlIdx )}, 100 );
316
 
317
  }
318
 
@@ -326,7 +326,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
326
 
327
  // Show spinner
328
  if ( wppaOvlFirst ) {
329
- jQuery( "#wppa-ovl-spin" ).fadeIn( 1500 );
330
  }
331
 
332
  // Find handy switches
@@ -341,7 +341,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
341
  wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
342
  if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete ) {
343
  wppaConsoleLog( 'Retrying preload current image' );
344
- setTimeout( '_wppaOvlShow(' + idx + ')', 100 );
345
  return;
346
  }
347
  }
@@ -512,9 +512,9 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
512
  // wppaReplaceSvg();
513
 
514
  wppaOvlIsVideo = wppaIsVideo;
515
- setTimeout( 'wppaOvlFormatFull()', 10 );
516
  if ( wppaIsVideo || wppaHasAudio ) {
517
- setTimeout( 'wppaOvlUpdateFsId()', 2000 );
518
  }
519
  else {
520
  wppaOvlFsPhotoId = 0;
@@ -906,7 +906,7 @@ wppaConsoleLog( 'wppaOvlSize' );
906
 
907
  // Done?
908
  if ( ! done ) {
909
- setTimeout( function(){ wppaOvlSize(wppaOvlAnimSpeed) }, speed + 100 );
910
  wppaConsoleLog( 'Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+
911
  ', img complete='+document.getElementById( 'wppa-overlay-img' ).complete );
912
  }
@@ -939,7 +939,7 @@ wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
939
  if ( ! wppaIsIe && ( ! img || ! img.complete ) ) {
940
 
941
  // Wait for load complete
942
- setTimeout( 'wppaOvlFormatFull()', 100 );
943
  return;
944
  }
945
  natWidth = img.naturalWidth;
@@ -1111,7 +1111,7 @@ wppaConsoleLog( 'wppaOvlRun, running='+wppaOvlRunning );
1111
 
1112
  // Wait until playing audio or video ends
1113
  if ( wppaOvlVideoPlaying || wppaOvlAudioPlaying ) {
1114
- setTimeout( 'wppaOvlRun()', 500 );
1115
  return;
1116
  }
1117
 
@@ -1121,7 +1121,7 @@ wppaConsoleLog( 'wppaOvlRun, running='+wppaOvlRunning );
1121
  if ( elm ) {
1122
  if ( ! wppaIsIe && ! elm.complete ) {
1123
  wppaConsoleLog( 'Wait during run' );
1124
- setTimeout( 'wppaOvlRun()', 500 );
1125
  return;
1126
  }
1127
  }
@@ -1323,10 +1323,10 @@ function wppaOvlResize() {
1323
  wppaConsoleLog( 'wppaOvlResize' );
1324
 
1325
  // After resizing, the number of lines may have changed
1326
- setTimeout( 'wppaOvlSize( '+wppaOvlAnimSpeed+' )', 100 );
1327
 
1328
  if ( wppaOvlAudioStart && ! wppaOvlAudioPlaying ) {
1329
- setTimeout( 'wppaOvlStartAudio()', 1000 );
1330
  }
1331
  }
1332
 
43
 
44
  // Full screen and still in?
45
  if ( wppaOvlMode != 'normal' && document.getElementById( 'wppa-overlay-img' ) ) {
46
+ setTimeout( 'wppaOvlShow( ' + wppaOvlIdx + ' )', 10 );
47
  return;
48
  }
49
  }
139
  } else if ( elem.webkitRequestFullscreen ) {
140
  elem.webkitRequestFullscreen();
141
  }
142
+ setTimeout( function(){wppaOvlShow( wppaOvlIdx )}, 50 );
143
  }
144
 
145
  // Cancel fullscreen. This is browser dependant
153
  }
154
  }
155
 
156
+ setTimeout( function(){wppaShowFsButtons(0.75)}, 30 );
157
 
158
  // Remove legenda
159
  jQuery( '#wppa-ovl-legenda-1' ).html( '' );
182
  return;
183
  }
184
 
185
+ setTimeout( function(){wppaShowFsButtons(0.75)}, 30 );
186
 
187
+ setTimeout( function(){wppaOvlShow(wppaOvlIdx)}, 50 );
188
  }
189
 
190
  // Prepare the display of the lightbox overlay.
312
  }
313
 
314
  // Now start the actual function
315
+ setTimeout( function(){ _wppaOvlShow( wppaOvlIdx )}, 1 );
316
 
317
  }
318
 
326
 
327
  // Show spinner
328
  if ( wppaOvlFirst ) {
329
+ jQuery( "#wppa-ovl-spin" ).fadeIn( 500 );
330
  }
331
 
332
  // Find handy switches
341
  wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
342
  if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete ) {
343
  wppaConsoleLog( 'Retrying preload current image' );
344
+ setTimeout( '_wppaOvlShow(' + idx + ')', 10 );
345
  return;
346
  }
347
  }
512
  // wppaReplaceSvg();
513
 
514
  wppaOvlIsVideo = wppaIsVideo;
515
+ setTimeout( 'wppaOvlFormatFull()', 1 );
516
  if ( wppaIsVideo || wppaHasAudio ) {
517
+ setTimeout( 'wppaOvlUpdateFsId()', 20 );
518
  }
519
  else {
520
  wppaOvlFsPhotoId = 0;
906
 
907
  // Done?
908
  if ( ! done ) {
909
+ setTimeout( function(){ wppaOvlSize(wppaOvlAnimSpeed) }, speed + 10 );
910
  wppaConsoleLog( 'Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+
911
  ', img complete='+document.getElementById( 'wppa-overlay-img' ).complete );
912
  }
939
  if ( ! wppaIsIe && ( ! img || ! img.complete ) ) {
940
 
941
  // Wait for load complete
942
+ setTimeout( 'wppaOvlFormatFull()', 10 );
943
  return;
944
  }
945
  natWidth = img.naturalWidth;
1111
 
1112
  // Wait until playing audio or video ends
1113
  if ( wppaOvlVideoPlaying || wppaOvlAudioPlaying ) {
1114
+ setTimeout( 'wppaOvlRun()', 50 );
1115
  return;
1116
  }
1117
 
1121
  if ( elm ) {
1122
  if ( ! wppaIsIe && ! elm.complete ) {
1123
  wppaConsoleLog( 'Wait during run' );
1124
+ setTimeout( 'wppaOvlRun()', 50 );
1125
  return;
1126
  }
1127
  }
1323
  wppaConsoleLog( 'wppaOvlResize' );
1324
 
1325
  // After resizing, the number of lines may have changed
1326
+ setTimeout( 'wppaOvlSize( '+wppaOvlAnimSpeed+' )', 10 );
1327
 
1328
  if ( wppaOvlAudioStart && ! wppaOvlAudioPlaying ) {
1329
+ setTimeout( 'wppaOvlStartAudio()', 100 );
1330
  }
1331
  }
1332
 
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",100)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=p.keyCode,e=27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},300),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},300),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500))}function wppaOvlShow(p){if(wppaConsoleLog("wppaOvlShow arg="+p),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0;var a,e=(a=p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(e[1]){var t,o,l=e[1],i=jQuery("a"),w=0;for(o=0;o<i.length;o++)t=i[o],(e=!!jQuery(t).attr("data-rel")&&jQuery(t).attr("data-rel").split("[")).length>1&&"wppa"==e[0]&&e[1]==l&&(wppaOvlUrls[w]=t.href,jQuery(t).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(jQuery(t).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(t.title),wppaOvlAlts[w]=jQuery(t).attr("data-alt")?jQuery(t).attr("data-alt"):"",wppaOvlVideoHtmls[w]=jQuery(t).attr("data-videohtml")?decodeURI(jQuery(t).attr("data-videohtml")):"",wppaOvlAudioHtmls[w]=jQuery(t).attr("data-audiohtml")?decodeURI(jQuery(t).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=jQuery(t).attr("data-videonatwidth")?jQuery(t).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=jQuery(t).attr("data-videonatheight")?jQuery(t).attr("data-videonatheight"):"",t.href==p.href&&(wppaOvlIdx=w),w++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(1500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",100);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,"normal"!=wppaOvlMode){wppaIsVideo?(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>"):(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+jQuery(window).width()+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>");var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",2e3):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i=jQuery(window).width(),w=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight);var n,d,r;void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(n=(i-3*wppaOvlBorderWidth)/o)<(d=w/l)?n:d)<1&&(o=parseInt(o*r),l=parseInt(l*r));var v,s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v=w-s-20-2*wppaOvlBorderWidth):v=w-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(v*o/l),h=(wppaOvlPadTop,parseInt((i-u)/2),u);l<v&&(wppaOvlPadTop+(v-l)/2,parseInt((i-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").stop().fadeOut(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+100),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}function wppaOvlFormatFull(){wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode);var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",100);a=p.naturalWidth,e=p.naturalHeight}var t=jQuery(window).width()/jQuery(window).height(),o=a/e,l=0,i=0,w=0,n=0,d=0,r=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o):(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width());break;case"stretched":l=0,i=0,w=jQuery(window).height(),n=jQuery(window).width();break;case"clipped":t>o?(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width()):(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o);break;case"realsize":(l=(jQuery(window).width()-a)/2)<0&&(r=parseInt(-l),l=0),(i=(jQuery(window).height()-e)/2)<0&&(d=parseInt(-i),i=0),w=e,n=a,v="auto"}return l=parseInt(l),i=parseInt(i),w=parseInt(w),n=parseInt(n),jQuery(p).css({height:w,width:n,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(d),jQuery("#wppa-ovl-full-bg").scrollLeft(r),jQuery("#wppa-ovl-spin").stop().fadeOut(),!0}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",500);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",500)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1),!1)}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1),!1)}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;p.clientY>48&&(a<jQuery(window).width()/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlCurIdx=0,0==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0]&&(wppaWppaOverlayActivated=!0,wppaIsMobile?(jQuery(p).on("touchstart",function(p){wppaStartTime()}),jQuery(p).on("touchend",function(p){wppaInTime()&&wppaOvlShow(this),p.preventDefault()})):jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",100),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",1e3)}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}var wppaLightboxVersion="6.7.06",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0,wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight;jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaLightboxVersion="6.7.06",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=p.keyCode,e=27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){if(wppaConsoleLog("wppaOvlShow arg="+p),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0;var a=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(a[1]){var e,t,o=a[1],l=jQuery("a"),i=0;for(t=0;t<l.length;t++)e=l[t],(a=!!jQuery(e).attr("data-rel")&&jQuery(e).attr("data-rel").split("[")).length>1&&"wppa"==a[0]&&a[1]==o&&(wppaOvlUrls[i]=e.href,jQuery(e).attr("data-lbtitle")?wppaOvlTitles[i]=wppaRepairScriptTags(jQuery(e).attr("data-lbtitle")):wppaOvlTitles[i]=wppaRepairScriptTags(e.title),wppaOvlAlts[i]=jQuery(e).attr("data-alt")?jQuery(e).attr("data-alt"):"",wppaOvlVideoHtmls[i]=jQuery(e).attr("data-videohtml")?decodeURI(jQuery(e).attr("data-videohtml")):"",wppaOvlAudioHtmls[i]=jQuery(e).attr("data-audiohtml")?decodeURI(jQuery(e).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[i]=jQuery(e).attr("data-videonatwidth")?jQuery(e).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[i]=jQuery(e).attr("data-videonatheight")?jQuery(e).attr("data-videonatheight"):"",e.href==p.href&&(wppaOvlIdx=i),i++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",10);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,"normal"!=wppaOvlMode){wppaIsVideo?(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>"):(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+jQuery(window).width()+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>"),l+="</div>");var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>",(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",1),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,w,n,d,r=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(n=(i=(r-3*wppaOvlBorderWidth)/o)<(w=v/l)?i:w)<1&&(o=parseInt(o*n),l=parseInt(l*n));var s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),d=v-s-20-2*wppaOvlBorderWidth):d=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(d*o/l),h=(wppaOvlPadTop,parseInt((r-u)/2),u);l<d&&(wppaOvlPadTop+(d-l)/2,parseInt((r-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").stop().fadeOut(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}function wppaOvlFormatFull(){var p,a,e;if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=jQuery(window).width()/jQuery(window).height(),o=a/e,l=0,i=0,w=0,n=0,d=0,r=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o):(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width());break;case"stretched":l=0,i=0,w=jQuery(window).height(),n=jQuery(window).width();break;case"clipped":t>o?(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width()):(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o);break;case"realsize":(l=(jQuery(window).width()-a)/2)<0&&(r=parseInt(-l),l=0),(i=(jQuery(window).height()-e)/2)<0&&(d=parseInt(-i),i=0),w=e,n=a,v="auto"}return l=parseInt(l),i=parseInt(i),w=parseInt(w),n=parseInt(n),jQuery(p).css({height:w,width:n,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(d),jQuery("#wppa-ovl-full-bg").scrollLeft(r),jQuery("#wppa-ovl-spin").stop().fadeOut(),!0}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1),!1)}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1),!1)}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;p.clientY>48&&(a<jQuery(window).width()/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlCurIdx=0,0==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0]&&(wppaWppaOverlayActivated=!0,wppaIsMobile?(jQuery(p).on("touchstart",function(p){wppaStartTime()}),jQuery(p).on("touchend",function(p){wppaInTime()&&wppaOvlShow(this),p.preventDefault()})):jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100)}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,12 +2,13 @@
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.8.03
6
- Stable tag: 6.8.02
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
  Tested up to: 4.9
 
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -70,8 +71,6 @@ Translations:
70
 
71
  = Requirements =
72
 
73
- * The plugin requires at least wp version 3.1.
74
- * The server should run PHP version 5.5 or later.
75
  * The theme should have a call to wp_head() in its header.php file and wp_footer() in its footer.php file.
76
  * The theme should load enqueued scripts in the header if the scripts are enqueued without the $in_footer switch (like wppa.js and jQuery).
77
  * The theme should not prevent this plugin from loading the jQuery library in its default wp manner, i.e. the library jQuery in safe mode (uses jQuery() and not $()).
@@ -125,311 +124,29 @@ If this happens, make sure (ask your hosting provider) that you have all the rig
125
 
126
  == Changelog ==
127
 
128
- See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
130
- = 6.8.03 =
131
 
132
- = Bug Fixes =
133
 
134
- * Due to a left-over from testing, switching to flat album table did no longer work. Fixed.
135
- * On the album admin page: if the album is full, two - inactive - upload/import buttons were displayed. Fixed.
136
- * On the photo admin screen: the caption of the exif table was not translatable. Fixed.
137
 
138
- = New Features =
139
 
140
- * You can keep a history log of the photo of the day. See the photo of the day admin page. It will show up at the admin dashboard.
141
-
142
- = Other Changes =
143
-
144
- * If the default photo description (Table IX-D5) contains HTML code, it will no longer be shown on the frontend upload dialog.
145
- * Wppa will no longer crash the sites admin at activation time when the PHP EXIF functions are not activated.
146
-
147
- = 6.8.02 =
148
-
149
- = Bug Fixes =
150
-
151
- * Sourcefiles got erroneoulsy removed in certain circumstances.
152
- This happened when there were two or more photos with the same name in an album and one got deleted.
153
- This also happened when a photo was deleted and re-uploaded before the background process actually removed the files of the deleted photo.
154
- This issue has been fixed.
155
- * w#hrurl and w#pl in photo descriptions got wrong results when the filename contained spaces or brackets. Fixed.
156
- * Fixes for compatibility with plugin Simple Cart & By Now. This plugin is not maintained for over three years.
157
- If you update to wppa version 6.8.02 and use SCABN, you MUST install the special - fixed - version to maintain compatibility.
158
-
159
- = New Features =
160
-
161
- * Table VII-B4: Fe limts per album. If this box is ticked, the upload limits set for userroles apply to each album individually where the user has frontend oploads to.
162
- * You can now add browser specific css. Table IV-A15.x.
163
- * If the user has the right to import, there is a button on the album admin screen to import to the album, like the upload to this album button.
164
- * Added links to upload and import pages on the album admin main page, dependant of user rights.
165
-
166
- = Other Changes =
167
-
168
- * On most installations you will no longer see failed uploads due to memory limitations.
169
- When there is not enough memory to downsize photos or to apply watermarks, downsizing will be skipped.
170
- Note that in those cases one can have copies of the original photofiles as thumbnail images.
171
- If this happens often, it is rcommended to set an upload size limit in Table VII-B10.2 to force users to upload smaller images,
172
- or to ask the hosting provider to increase the available sever memory.
173
- * Created a fixed version of plugin Simple Cart & Buy Now. You will need this special version if you previously used Simple Cart & Buy Now in combination with wppa.
174
- Download it <a href="https://wppa.nl/wp-content/uploads/simple-cart-buy-now-for-wppa.zip" >here</a>
175
-
176
- = 6.8.01 =
177
-
178
- = Bug Fixes =
179
-
180
- * Fixed layout issues of the album navigator widget and the album / photo admin pages.
181
-
182
- = New Features =
183
-
184
- * GPS and File tags are now supported in the exif system.
185
-
186
- = Other Changes =
187
-
188
- * Added to the bestof widget: A checkbox to display the sum of the ratings (totvalue), and the option to sort by the sum of the ratings.
189
- * Bestof shortcode now also supports the display of the sum of the ratings (totvalue="yes"), and the sort option to sort by the sum of the ratings (sortby="totvalue").
190
- The full shortcode is now: [wppa type="bestof" page="nn" count="nn" display="photo|owner" period="thisweek|lastweek|lastmonth|thismonth|lastyear|thisyear" sortby="maxratingcount|meanrating|ratingcount|totvalue" maxratings="yes|no" meanrat="yes|no" ratcount="yes|no" totvalue="no|yes" linktype="none|owneralbums|ownerphotos|upldrphotos" fontsize="nn" lineheight="nn" height="nn"][/wppa]
191
- Note: For backward compatibility: the default for displaying the total value is no (totvalue="no") as opposed to the other display options.
192
- * Exif arrays are now stored as arrays as opposed to multiple items with the same tag id. This enables interpretation and formatting of array value tags.
193
- * Improved display of help text in settings and photo of the day settings admin pages.
194
- * Removed obsolete browser specific css.
195
- * Improved layout and behaviour of frontend upload dialog.
196
-
197
- = 6.8.00 =
198
-
199
- = Bug Fixes =
200
-
201
- * Various minor fixes for PHP 7.2 compatibility.
202
- * If the visitor does not have the rights to edit a photo at the front-end, there will not be a link or button to the edit page.
203
- * On the Import and Upload Photos admin pages one can now select a target album even when there are more albums than the setting in Table IX-B6.3.
204
- * The most recently uploaded photo had its viewcount bumped for every session when the [photo] shortcode was enabled. Fixed.
205
- * If you use qr codes and cache them (See Table IX-K1.4), the cache will be cleared regularly to prvent the generation of too many files.
206
-
207
- = New Features =
208
-
209
- * On the Album Admin -> Edit screen: the photo information now also shows the EXIF data, if available.
210
- * Shortcode [photo xxx] can now have 'random' as argument, e.g.: [photo random]. See Table IX-L for details.
211
- * On the shortcode generator, one can optionally select one or more albums for the upload box.
212
-
213
- = Other Changes =
214
-
215
- * Supersearch. Selection boxes are now sorted, exif values are formatted.
216
- Certain camera brand specific tags are now recognized and (partially) correct formatted.
217
- * Further improved formatting of various exif tags.
218
-
219
- = 6.7.12 =
220
-
221
- = Bug Fixes =
222
-
223
- * Various minor fixes for PHP 7.1 compatibility.
224
- * Exif tags are now formatted when used as keywords.
225
-
226
- = Other Changes =
227
-
228
- * If Table IX-L5 is set to html, the html defaults to type sphoto.
229
- * Improved formatting of various exif tags.
230
-
231
- = 6.7.11 =
232
-
233
- = Bug Fixes =
234
-
235
- * Fixed a typo in bbpress compatibility code.
236
- * Uploads on the [photo] shortcode generator dialog box now work as expected.
237
- * Certain links did not work due to an internal counter bug. Fixed.
238
-
239
- = 6.7.10 =
240
-
241
- = Bug Fixes =
242
-
243
- * Various minor fixes for PHP 7.1 compatibility.
244
-
245
- = New Features =
246
-
247
- * The shortcode generator for shortcode [photo xxx] is now also available for front-end tinymce editors.
248
- See https://wppa.nl/docs-by-subject/advanced-topics/shortcode-photo/ for an explanation.
249
-
250
- = 6.7.09 =
251
-
252
- = Bug Fixes =
253
-
254
- * Slideshow widget bug fixes:
255
- --- all albums --- did not work, fixed.
256
- On initial display of the activation screen, the default setting values were not shown. Fixed.
257
- Album selectionbox was not sorted. Fixed.
258
- Height could not be set to 0 (auto). Fixed.
259
- * Shortcode generator bug fixes:
260
- Fixed album enumeration delimiter; must be '.' rather than ','
261
- Fixed colors in selectionboxes (red: required selection missing or invalid input; green: selection/input is ok).
262
- Single image preview videos work correctly now.
263
-
264
- = New Features =
265
-
266
- * Slideshow widget new features:
267
- Added checkbox 'Random' for random photo sequence. The sequence will change every pageload.
268
- Added checkbox 'Include subalbums'.
269
-
270
- = Other Changes =
271
-
272
- * Sildeshow widget other changes:
273
- You can set a maximum number of slides, to prevent heavy pageloads, especially when --- all albums --- is used.
274
- The slideshow now always wraps around, regardless of the setting of Table IV-B8.
275
-
276
- = 6.7.08 =
277
-
278
- = Bug Fixes =
279
-
280
- * Fixed a problem when using imagemagick and the upload file contains spaces in the name.
281
-
282
- = New Features =
283
-
284
- * Added shortcode generator for shortcode [photo]. Including upload new photo. Requires enabling the use of shortcode [photo] in Table IX-L1.
285
-
286
- = Other Changes =
287
-
288
- * Added 'Albums only' to Table IX-E12: Search results display.
289
- * Changed defaults for max albums to 500 in Table IX-B6.3 and Table VII-B13. Note: The value in Table VII-B13 should be <= Table IX-B6.3.
290
-
291
- = 6.7.07 =
292
-
293
- = Bug Fixes =
294
-
295
- * Fixed a spurious missing switch to flat/collapsible table button on the Album Admin page.
296
- * Fixed a spurious error on local host systems.
297
- * Fixed a problem displaying the widget admin page and customize screen when the system has many albums ( >> 1000 ).
298
-
299
- = New Features =
300
-
301
- * New shortcode attribute button for type="slide" only. Example: [wppa type="slide" album="13" button="Show me the slideshow"][/wppa]
302
- This will hide the slideshow behind a button. Clicking the button will download the slideshow code to the browser. This is to reduce and speedup loading pages with slideshow(s).
303
- * You can now restrict frontend uploads to one or more user roles. See Table II-H2.1
304
-
305
- = Other Changes =
306
-
307
- * Added a dummy index.php to all subfolders and to folders creted by wppa.
308
-
309
- = 6.7.06 =
310
-
311
- = Bug Fixes =
312
-
313
- * Fixed hanging lightbox on old versions of Internet Explorer.
314
- * Album widget frontend display on backend failed due to undefined function wppa_get_coverphoto_id(). Fixed.
315
- * At frontend upload: selected photo tags lost accented characters. Fixed.
316
- * Fixed an un-well formed numeric value error in php 7.
317
-
318
- = New Features =
319
-
320
- * Added activity widget on wp desktop
321
- * Added link to lightbox single image on the BestOf widget.
322
-
323
- = Other Changes =
324
-
325
- * For clarity: The texts 'Awaiting moderation' and 'Scheduled for XXXX' are now also displayed for the owner of the photo and users with moderate rights where it applies.
326
-
327
- = 6.7.05 =
328
-
329
- = Bug Fixes =
330
-
331
- * Album selectionboxes on the album admin page have alphabetically sorted content again.
332
-
333
- = New Features =
334
-
335
- * Negate option in search. Enter token1 !token2 to get all albums/photos that match token1 but do not match token2.
336
-
337
- = 6.7.04 =
338
-
339
- = Bug Fixes =
340
-
341
- * Fixed a filesystem rights issue.
342
- * Table IV-A18: cretae .htaccess file now works as expected.
343
-
344
- = Other Changes =
345
-
346
- * Fixed photo search form for mis-behaving themes like weaver ii.
347
- * Logging of filesystem events. Table IX-A9.4.
348
-
349
- = 6.7.03 =
350
-
351
- = Bug Fixes =
352
-
353
- * Album sequence in Upload page was odd since 6.7.01. Fixed.
354
-
355
- = New Features =
356
-
357
- * The category selection box from the widget is now also available in the search box, see Table IX-E19.
358
- * Up to 3 selectionboxes can be configured with lists of pre-defined search tokens. See Table IX-E20.x and the widget activation screen.
359
-
360
- = 6.7.02 =
361
-
362
- = Bug Fixes =
363
-
364
- * Various minor fixes that caused warnings but without any functional effect.
365
- * Now passes PHP 7 compatibility check without any errors or warnings.
366
- * Album sequence in Import page was odd since 6.7.01. Fixed.
367
-
368
- = New Features =
369
-
370
- * Table I-G5: Fullscreen button size, to set the size of the fullscreen and exit buttons on lightbox.
371
- * You can secify the order number of the landing shortcode (occ) on the search landing page. This makes it possible to have the search box shortcode first, and the landing page shortcode second (occ=2). Table IX-E1.
372
-
373
- = Other Changes =
374
-
375
- * If your theme shows a magnifier glass on the search input, the Search Photos dialog will do the same.
376
-
377
- = 6.7.01 =
378
-
379
- = Bug Fixes =
380
-
381
- * Under some circumstances the audiobar under slideshow was mis-aligned. Fixed.
382
- * Many textual fixes (mainly typos).
383
-
384
- = New Features =
385
-
386
- * Table IX-A11: Minimum tags. These tags exist even when there are no photos that have one or more of these tags.
387
- * Table IX-A12: Login link. Change this if you have a custom login page and you have ticked Table IV-F1: Commenting login or Table IV-E1: Rating login.
388
-
389
- = Other Changes =
390
-
391
- * Widgets have been revised to make the activation screens more consistent in usage and appearance.
392
-
393
- = 6.7.00 =
394
-
395
- = Bug Fixes =
396
-
397
- * Many textual fixes, thanx to Stefan Eggers who has completed the german translations.
398
- * Fixed a rounding issue in the calculation of wppa container width when the width in the shortcode was set to a fraction, causing intermittent layout issues.
399
-
400
- = New Features =
401
-
402
- * New shortcode attribute **timeout** for slideshows (type="slide", type="slideonly", type="slideonlyf"). Usage: [wppa type="slide" album="13" timeout="2000"][/wppa] for 2000ms. (2s.) timeout.
403
- [wppa type="slide" album="13" timeout="random"][/wppa] for a random timeout between 2 and 7 times the animation speed.
404
- * Completed translations for the German language, by Stefan Eggers
405
-
406
- = 6.6.x =
407
-
408
- * See <a href="https://wppa.nl/changelog/changelog-6-6-x/" >changelog-6-6-x/</a>
409
-
410
- = 6.5.x =
411
-
412
- * See <a href="https://wppa.nl/changelog/changelog-6-5-x/" >changelog-6-5-x/</a>
413
-
414
- = 6.4.x =
415
-
416
- * See <a href="https://wppa.nl/changelog/changelog-6-4-x/" >changelog-6-4-x/</a>
417
-
418
- = 6.3.x =
419
-
420
- * See <a href="https://wppa.nl/changelog/changelog-6-3-x/" >changelog-6-3-x/</a>
421
-
422
- = 6.2.x =
423
-
424
- * See <a href="https://wppa.nl/changelog/changelog-6-2-x/" >changelog-6-2-x/</a>
425
-
426
- = 6.1.x =
427
-
428
- * See <a href="https://wppa.nl/changelog/changelog-6-1-x/" >changelog-6-1-x/</a>
429
-
430
- = 6.0.x =
431
-
432
- * See <a href="https://wppa.nl/changelog/changelog-6-1-x/#6.0.0" >changelog-6-0-x/</a>
433
 
434
  == About and Credits ==
435
 
@@ -438,4 +155,4 @@ This will hide the slideshow behind a button. Clicking the button will download
438
 
439
  == Licence ==
440
 
441
- WP Photo Album is released under the GNU GPL licence. ( http://www.gnu.org/copyleft/gpl.html ))
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.8.04
6
+ Stable tag: 6.8.03
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
10
  Tested up to: 4.9
11
+ Requires PHP: 5.5
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
71
 
72
  = Requirements =
73
 
 
 
74
  * The theme should have a call to wp_head() in its header.php file and wp_footer() in its footer.php file.
75
  * The theme should load enqueued scripts in the header if the scripts are enqueued without the $in_footer switch (like wppa.js and jQuery).
76
  * The theme should not prevent this plugin from loading the jQuery library in its default wp manner, i.e. the library jQuery in safe mode (uses jQuery() and not $()).
124
 
125
  == Changelog ==
126
 
127
+ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
128
 
129
+ == Upgrade Notice ==
130
 
131
+ = 6.8.04 =
132
 
133
+ * This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
 
 
134
 
135
+ == Screenshots ==
136
 
137
+ 1. Typical display of album covers
138
+ 2. Typical display of thumbnails as seen by the owner of the photos and the administrator
139
+ 3. Upper part of a slideshow
140
+ 4. Lower part of a slideshow, including filmstrip, rating and comment sections and exif data. all included optional features
141
+ 5. Album admin: the table of albums
142
+ 6. Album admin: the album specifications edit screen
143
+ 7. Album admin: edit photo information screen
144
+ 8. Bulk edit photo information screen
145
+ 9. Photo sequence editor screen
146
+ 10. Comment admin and moderation screen
147
+ 11. Photo of the day configuration screen
148
+ 12. Embedded lightbox example
149
+ 13. The quick setup screen
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
 
151
  == About and Credits ==
152
 
155
 
156
  == Licence ==
157
 
158
+ WP Photo Album is released under the GNU GPL licence. ( http://www.gnu.org/copyleft/gpl.html )
wppa-album-navigator-widget.php CHANGED
@@ -3,38 +3,41 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
- * Version 6.8.01
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
10
 
11
  /** constructor */
12
  function __construct() {
13
- $widget_ops = array( 'classname' => 'wppa_album_navigator_widget', 'description' => __( 'Display hierarchical album navigator', 'wp-photo-album-plus' ) );
14
- parent::__construct( 'wppa_album_navigator_widget', __( 'WPPA+ Album Navigator', 'wp-photo-album-plus' ), $widget_ops );
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
  /** @see WP_Widget::widget */
18
  function widget($args, $instance) {
 
19
  global $wpdb;
20
 
21
- require_once(dirname(__FILE__) . '/wppa-links.php');
22
- require_once(dirname(__FILE__) . '/wppa-styles.php');
23
- require_once(dirname(__FILE__) . '/wppa-functions.php');
24
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
25
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
26
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
27
  wppa_initialize_runtime();
28
-
29
  wppa( 'in_widget', 'albnav' );
30
  wppa_bump_mocc();
31
 
32
  extract( $args );
33
 
34
  $instance = wp_parse_args( (array) $instance, array(
35
- 'title' => __( 'Album Navigator', 'wp-photo-album-plus' ), // Widget title
36
- 'parent' => '0', // Parent album
37
- 'skip' => 'yes' // Skip empty albums
38
  ) );
39
 
40
  $widget_title = apply_filters('widget_title', $instance['title']);
@@ -51,7 +54,6 @@ class AlbumNavigatorWidget extends WP_Widget {
51
  $widget_content .= __( 'There are too many albums in the system for this widget', 'wp-photo-album-plus' );
52
  }
53
  else {
54
- // $widget_content .= '<div style="width:100%; overflow:hidden; position:relative; left: -12px;" >';
55
  if ( $parent == 'all' ) {
56
  $widget_content .= $this->do_album_navigator( '0', $page, $skip, '' );
57
  $widget_content .= $this->do_album_navigator( '-1', $page, $skip, '' );
@@ -63,7 +65,6 @@ class AlbumNavigatorWidget extends WP_Widget {
63
  else {
64
  $widget_content .= $this->do_album_navigator( $parent, $page, $skip, '' );
65
  }
66
- // $widget_content .= '</div>';
67
  $widget_content .= '<div style="clear:both"></div>';
68
  }
69
 
@@ -71,18 +72,20 @@ class AlbumNavigatorWidget extends WP_Widget {
71
  $widget_content .= "\n".'<!-- WPPA+ Album Navigator Widget end -->';
72
 
73
  echo "\n" . $before_widget;
74
- if ( ! empty( $widget_title ) ) { echo $before_title . $widget_title . $after_title; }
 
 
75
  echo $widget_content . $after_widget;
76
 
77
  wppa( 'in_widget', false );
78
  }
79
 
80
  /** @see WP_Widget::update */
81
- function update($new_instance, $old_instance) {
82
  $instance = $old_instance;
83
- $instance['title'] = strip_tags($new_instance['title']);
84
  $instance['parent'] = $new_instance['parent'];
85
- $instance['skip'] = $new_instance['skip'];
86
 
87
  return $instance;
88
  }
@@ -132,7 +135,7 @@ class AlbumNavigatorWidget extends WP_Widget {
132
  if ( $albs ) foreach( $albs as $alb ) {
133
  $options[] = __( stripslashes( $alb['name'] ) );
134
  $values[] = $alb['id'];
135
- $disabled[] = false;//! wppa_has_children( $alb['id'] );
136
  }
137
 
138
  echo
@@ -185,9 +188,16 @@ class AlbumNavigatorWidget extends WP_Widget {
185
  $a = $album['id'];
186
  $treecount = wppa_get_treecounts_a( $a );
187
  if ( $treecount['treealbums'] || $treecount['selfphotos'] > wppa_opt( 'min_thumbs' ) || ! $skip ) {
 
188
  $result .= '
189
- <li class="anw-'.$w.'-'.$p.$propclass.'" style="list-style:none;'.( $level == '1' ? '' : 'display:none;' ).'">';
190
- if ( wppa_has_children($a) ) $result .= '
 
 
 
 
 
 
191
  <div' .
192
  ' style="cursor:default;width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;"' .
193
  ' class="anw-'.$w.'-'.$a.'-"' .
@@ -221,12 +231,12 @@ class AlbumNavigatorWidget extends WP_Widget {
221
 
222
  $next_level = $this->do_album_navigator( $a, $page, $skip, $newpropclass, $extraclause );
223
  if ( $next_level ) {
224
- $result .= '<li class="anw-'.$w.'-'.$a.$propclass.'" style="list-style:none;display:none;" >' . $next_level . '</li>';
225
  }
226
  }
227
  }
228
  $result .= '</ul>';
229
- if ( $level == '1' && $ca ) { // && $parent != '-1' ) {
230
  $result .= '<script type="text/javascript" >';
231
  while ( $ca != '0' && $ca != '-1' ) {
232
  $result .= '
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
+ * Version 6.8.04
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
10
 
11
  /** constructor */
12
  function __construct() {
13
+
14
+ $widget_ops = array(
15
+ 'classname' => 'wppa_album_navigator_widget',
16
+ 'description' => __( 'Display hierarchical album navigator', 'wp-photo-album-plus' ),
17
+ );
18
+
19
+ parent::__construct(
20
+ 'wppa_album_navigator_widget',
21
+ __( 'WPPA+ Album Navigator', 'wp-photo-album-plus' ),
22
+ $widget_ops
23
+ );
24
  }
25
 
26
  /** @see WP_Widget::widget */
27
  function widget($args, $instance) {
28
+
29
  global $wpdb;
30
 
 
 
 
 
 
 
31
  wppa_initialize_runtime();
 
32
  wppa( 'in_widget', 'albnav' );
33
  wppa_bump_mocc();
34
 
35
  extract( $args );
36
 
37
  $instance = wp_parse_args( (array) $instance, array(
38
+ 'title' => __( 'Album Navigator', 'wp-photo-album-plus' ), // Widget title
39
+ 'parent' => '0', // Parent album
40
+ 'skip' => 'yes' // Skip empty albums
41
  ) );
42
 
43
  $widget_title = apply_filters('widget_title', $instance['title']);
54
  $widget_content .= __( 'There are too many albums in the system for this widget', 'wp-photo-album-plus' );
55
  }
56
  else {
 
57
  if ( $parent == 'all' ) {
58
  $widget_content .= $this->do_album_navigator( '0', $page, $skip, '' );
59
  $widget_content .= $this->do_album_navigator( '-1', $page, $skip, '' );
65
  else {
66
  $widget_content .= $this->do_album_navigator( $parent, $page, $skip, '' );
67
  }
 
68
  $widget_content .= '<div style="clear:both"></div>';
69
  }
70
 
72
  $widget_content .= "\n".'<!-- WPPA+ Album Navigator Widget end -->';
73
 
74
  echo "\n" . $before_widget;
75
+ if ( ! empty( $widget_title ) ) {
76
+ echo $before_title . $widget_title . $after_title;
77
+ }
78
  echo $widget_content . $after_widget;
79
 
80
  wppa( 'in_widget', false );
81
  }
82
 
83
  /** @see WP_Widget::update */
84
+ function update( $new_instance, $old_instance ) {
85
  $instance = $old_instance;
86
+ $instance['title'] = strip_tags( $new_instance['title'] );
87
  $instance['parent'] = $new_instance['parent'];
88
+ $instance['skip'] = $new_instance['skip'];
89
 
90
  return $instance;
91
  }
135
  if ( $albs ) foreach( $albs as $alb ) {
136
  $options[] = __( stripslashes( $alb['name'] ) );
137
  $values[] = $alb['id'];
138
+ $disabled[] = false;
139
  }
140
 
141
  echo
188
  $a = $album['id'];
189
  $treecount = wppa_get_treecounts_a( $a );
190
  if ( $treecount['treealbums'] || $treecount['selfphotos'] > wppa_opt( 'min_thumbs' ) || ! $skip ) {
191
+ $has_children = wppa_has_children($a);
192
  $result .= '
193
+ <li' .
194
+ ' class="anw-'.$w.'-'.$p.$propclass.'"' .
195
+ ' style="' .
196
+ 'list-style:none;' .
197
+ ( $level == '1' ? '' : 'display:none;' ) .
198
+ '"' .
199
+ ' >';
200
+ if ( $has_children ) $result .= '
201
  <div' .
202
  ' style="cursor:default;width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;"' .
203
  ' class="anw-'.$w.'-'.$a.'-"' .
231
 
232
  $next_level = $this->do_album_navigator( $a, $page, $skip, $newpropclass, $extraclause );
233
  if ( $next_level ) {
234
+ $result .= '<li id="anw-'.$w.'-'.$a.'" class="anw-'.$w.'-'.$a.$propclass.'" style="list-style:none;display:none;background-image:none;" >' . $next_level . '</li>';
235
  }
236
  }
237
  }
238
  $result .= '</ul>';
239
+ if ( $level == '1' && $ca ) {
240
  $result .= '<script type="text/javascript" >';
241
  while ( $ca != '0' && $ca != '-1' ) {
242
  $result .= '
wppa-album-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
- * Version 6.7.07
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -20,16 +20,9 @@ class AlbumWidget extends WP_Widget {
20
  function widget( $args, $instance ) {
21
  global $wpdb;
22
 
23
- require_once(dirname(__FILE__) . '/wppa-links.php');
24
- require_once(dirname(__FILE__) . '/wppa-styles.php');
25
- require_once(dirname(__FILE__) . '/wppa-functions.php');
26
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
27
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
28
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
29
-
30
  // For widget display at backend: wppa_get_coverphoto_id()
31
  require_once( dirname( __FILE__ ) . '/wppa-album-covers.php' );
32
-
33
  wppa_initialize_runtime();
34
 
35
  wppa( 'in_widget', 'alb' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
+ * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
20
  function widget( $args, $instance ) {
21
  global $wpdb;
22
 
 
 
 
 
 
 
 
23
  // For widget display at backend: wppa_get_coverphoto_id()
24
  require_once( dirname( __FILE__ ) . '/wppa-album-covers.php' );
25
+
26
  wppa_initialize_runtime();
27
 
28
  wppa( 'in_widget', 'alb' );
wppa-bestof-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
- * Version 6.8.01
7
  *
8
  */
9
 
@@ -21,14 +21,7 @@ class BestOfWidget extends WP_Widget {
21
  function widget( $args, $instance ) {
22
  global $wpdb;
23
 
24
- require_once(dirname(__FILE__) . '/wppa-links.php');
25
- require_once(dirname(__FILE__) . '/wppa-styles.php');
26
- require_once(dirname(__FILE__) . '/wppa-functions.php');
27
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
28
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
29
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
30
  wppa_initialize_runtime();
31
-
32
  wppa( 'in_widget', 'bestof' );
33
  wppa_bump_mocc();
34
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
+ * Version 6.8.04
7
  *
8
  */
9
 
21
  function widget( $args, $instance ) {
22
  global $wpdb;
23
 
 
 
 
 
 
 
24
  wppa_initialize_runtime();
 
25
  wppa( 'in_widget', 'bestof' );
26
  wppa_bump_mocc();
27
 
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.8.03
7
  *
8
  */
9
 
@@ -4254,9 +4254,9 @@ global $wpdb;
4254
  }
4255
 
4256
  // The bestof box
4257
- function wppa_bestof_box ( $args ) {
4258
 
4259
- wppa_container ( 'open' );
4260
  wppa_out( '<div' .
4261
  ' id="wppa-bestof-' . wppa( 'mocc' ) . '"' .
4262
  ' class="wppa-box wppa-bestof"' .
@@ -4267,7 +4267,7 @@ function wppa_bestof_box ( $args ) {
4267
  '</div>' .
4268
  '</div>'
4269
  );
4270
- wppa_container ( 'close' );
4271
  }
4272
 
4273
  // The Bestof html
@@ -4303,7 +4303,9 @@ function wppa_bestof_html( $args, $widget = true ) {
4303
  if ( ! in_array( $period, array ( 'lastweek', 'thisweek', 'lastmonth', 'thismonth', 'lastyear', 'thisyear' ) ) ) {
4304
  wppa_dbg_msg ( 'Invalid arg period "'.$period.'" must be "lastweek", "thisweek", "lastmonth", "thismonth", "lastyear" or "thisyear"', 'red', 'force' );
4305
  }
4306
- if ( ! $widget ) $size = $height;
 
 
4307
 
4308
  $result = '';
4309
 
@@ -4326,7 +4328,7 @@ function wppa_bestof_html( $args, $widget = true ) {
4326
  }
4327
  else {
4328
  $maxh = $size;
4329
- $maxw = round ( $maxh * $imgsize['0'] / $imgsize['1'] );
4330
  }
4331
  $totalh = $maxh + $lineheight;
4332
  if ( $maxratings == 'yes' ) $totalh += $lineheight;
@@ -4337,8 +4339,13 @@ function wppa_bestof_html( $args, $widget = true ) {
4337
  if ( $widget ) $clear = 'clear:both; '; else $clear = '';
4338
  $result .= "\n" .
4339
  '<div' .
4340
- ' class="wppa-widget"' .
4341
- ' style="'.$clear.'width:'.$maxw.'px; height:'.$totalh.'px; margin:4px; display:inline; text-align:center; float:left;"'.
 
 
 
 
 
4342
  ' >';
4343
 
4344
  // The medal if at the top
@@ -4397,12 +4404,34 @@ function wppa_bestof_html( $args, $widget = true ) {
4397
  $result .= '<a href="'.wppa_convert_to_pretty( $href ).'" title="'.$title.'" >';
4398
  }
4399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4400
  // The image
4401
- $result .= '<img' .
4402
- ' style="height:'.$maxh.'px; width:'.$maxw.'px;"' .
4403
- ' src="' . wppa_get_photo_url( $id, true, '', $maxw, $maxh ) . '"' .
4404
- ' ' . wppa_get_imgalt( $id ) .
4405
- ' />';
 
 
 
 
4406
 
4407
  // The /link
4408
  if ( $linktype != 'none' ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.8.04
7
  *
8
  */
9
 
4254
  }
4255
 
4256
  // The bestof box
4257
+ function wppa_bestof_box( $args ) {
4258
 
4259
+ wppa_container( 'open' );
4260
  wppa_out( '<div' .
4261
  ' id="wppa-bestof-' . wppa( 'mocc' ) . '"' .
4262
  ' class="wppa-box wppa-bestof"' .
4267
  '</div>' .
4268
  '</div>'
4269
  );
4270
+ wppa_container( 'close' );
4271
  }
4272
 
4273
  // The Bestof html
4303
  if ( ! in_array( $period, array ( 'lastweek', 'thisweek', 'lastmonth', 'thismonth', 'lastyear', 'thisyear' ) ) ) {
4304
  wppa_dbg_msg ( 'Invalid arg period "'.$period.'" must be "lastweek", "thisweek", "lastmonth", "thismonth", "lastyear" or "thisyear"', 'red', 'force' );
4305
  }
4306
+ if ( ! $widget ) {
4307
+ $size = $height;
4308
+ }
4309
 
4310
  $result = '';
4311
 
4328
  }
4329
  else {
4330
  $maxh = $size;
4331
+ $maxw = $size; // round ( $maxh * $imgsize['0'] / $imgsize['1'] );
4332
  }
4333
  $totalh = $maxh + $lineheight;
4334
  if ( $maxratings == 'yes' ) $totalh += $lineheight;
4339
  if ( $widget ) $clear = 'clear:both; '; else $clear = '';
4340
  $result .= "\n" .
4341
  '<div' .
4342
+ ' class="' . ( $widget ? 'wppa-widget' : 'thumbnail-frame-' . wppa( 'mocc' ) ) . '"' .
4343
+ ' style="' .
4344
+ $clear .
4345
+ 'width:' . $maxw . 'px;height:' . $totalh . 'px;' .
4346
+ ( $widget ? 'margin:4px;display:inline;' : 'margin-top:3px;margin-bottom:3px;margin-left:' . wppa_opt( 'tn_margin' ) . 'px;' ) .
4347
+ 'text-align:center;float:left;' .
4348
+ '"'.
4349
  ' >';
4350
 
4351
  // The medal if at the top
4404
  $result .= '<a href="'.wppa_convert_to_pretty( $href ).'" title="'.$title.'" >';
4405
  }
4406
 
4407
+ // Compute image top margin for box version
4408
+ $tx = wppa_get_thumbx( $id );
4409
+ $ty = wppa_get_thumby( $id );
4410
+ $tm = '0';
4411
+ if ( $tx > $ty ) {
4412
+ $totm = ( $tx - $ty ) * ( $maxh / $tx );
4413
+ switch( wppa_opt( 'valign' ) ) {
4414
+ case 'center':
4415
+ $tm = round( $totm / 2 );
4416
+ break;
4417
+ case 'bottom':
4418
+ $tm = $totm;
4419
+ break;
4420
+ default:
4421
+ $tm = 0;
4422
+ }
4423
+ }
4424
+
4425
  // The image
4426
+ $result .=
4427
+ '<div style="height:' . $maxh . 'px;width:' . $maxw . 'px;" >' .
4428
+ '<img' .
4429
+ ( $widget ? ' style="height:' . $maxh . 'px; width:' . $maxw . 'px;"' :
4430
+ ' style="max-height:' . $maxh . 'px; max-width:' . $maxw . 'px;margin-top:' . $tm . 'px;"' ) .
4431
+ ' src="' . wppa_get_photo_url( $id, true, '', $maxw, $maxh ) . '"' .
4432
+ ' ' . wppa_get_imgalt( $id ) .
4433
+ ' />' .
4434
+ '</div>';
4435
 
4436
  // The /link
4437
  if ( $linktype != 'none' ) {
wppa-comment-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
- * Version 6.7.01
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -20,12 +20,6 @@ class wppaCommentWidget extends WP_Widget {
20
  function widget($args, $instance) {
21
  global $wpdb;
22
 
23
- require_once(dirname(__FILE__) . '/wppa-links.php');
24
- require_once(dirname(__FILE__) . '/wppa-styles.php');
25
- require_once(dirname(__FILE__) . '/wppa-functions.php');
26
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
27
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
28
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
29
  wppa_initialize_runtime();
30
 
31
  // Hide widget if not logged in and login required to see comments
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
+ * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
20
  function widget($args, $instance) {
21
  global $wpdb;
22
 
 
 
 
 
 
 
23
  wppa_initialize_runtime();
24
 
25
  // Hide widget if not logged in and login required to see comments
wppa-common-functions.php CHANGED
@@ -1261,8 +1261,16 @@ function wppa_check_memory_limit( $verbose = true, $x = '0', $y = '0' ) {
1261
  else { // Request for tel me what is the limit
1262
  $maxx = sqrt( $maxpixels / 12 ) * 4;
1263
  $maxy = sqrt( $maxpixels / 12 ) * 3;
 
 
1264
  if ( $verbose ) { // Make it a string
1265
- $result = '<br />'.sprintf( __( 'Based on your server memory limit you should not upload images larger then %2.1f Mega pixels' , 'wp-photo-album-plus'), $maxpixels / ( 1024 * 1024 ) );
 
 
 
 
 
 
1266
  }
1267
  else { // Or an array
1268
  $result['maxx'] = $maxx;
1261
  else { // Request for tel me what is the limit
1262
  $maxx = sqrt( $maxpixels / 12 ) * 4;
1263
  $maxy = sqrt( $maxpixels / 12 ) * 3;
1264
+ $maxxhd = sqrt( $maxpixels / 144 ) * 16;
1265
+ $maxyhd = sqrt( $maxpixels / 144 ) * 9;
1266
  if ( $verbose ) { // Make it a string
1267
+ $result = '<br />'.sprintf( __( 'Based on your server memory limit you should not upload images larger then <b>%2.1f</b> Mega pixels' , 'wp-photo-album-plus'), $maxpixels / ( 1024 * 1024 ) );
1268
+ $result .= '<br />'.sprintf( __( 'E.g. not bigger than approx %s x %s pixels (4:3) or %s x %s (16:9)', 'wp-photo-album-plus' ),
1269
+ '<b>' . ( round( $maxx / 25 ) * 25 ) . '</b>',
1270
+ '<b>' . ( round( $maxy / 25 ) * 25 ) . '</b>',
1271
+ '<b>' . ( round( $maxxhd / 25 ) * 25 ) . '</b>',
1272
+ '<b>' . ( round( $maxyhd / 25 ) * 25 ) . '</b>'
1273
+ );
1274
  }
1275
  else { // Or an array
1276
  $result['maxx'] = $maxx;
wppa-cron.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
- * Version 6.8.03
7
  *
8
  *
9
  */
@@ -38,14 +38,14 @@ global $is_reschedule;
38
  $delay = 5;
39
  }
40
  else switch ( $slug ) {
41
- case 'wppa_remake_index_photos': // one minute
42
- $delay = 60;
43
- break;
44
  case 'wppa_cleanup_index': // 1 hour
45
  $delay = 3600;
46
  break;
 
 
 
47
  default:
48
- $delay = 30; // 30 sec.
49
  }
50
  wp_schedule_single_event( time() + $delay, 'wppa_cron_event', array( $slug ) );
51
  $backtrace = debug_backtrace();
@@ -159,8 +159,26 @@ global $wpdb;
159
  return;
160
  }
161
 
 
 
162
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} started.' );
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  // Cleanup session db table
165
  $lifetime = 3600; // Sessions expire after one hour
166
  $savetime = 86400; // Save session data for 24 hour
@@ -197,10 +215,6 @@ global $wpdb;
197
  // Re-create permalink htaccess file
198
  wppa_create_pl_htaccess();
199
 
200
- // Cleanup index
201
- // wppa_index_compute_skips();
202
- // wppa_schedule_maintenance_proc( 'wppa_cleanup_index' );
203
-
204
  // Retry failed mails
205
  if ( wppa_opt( 'retry_mails' ) ) {
206
 
@@ -256,9 +270,10 @@ global $wpdb;
256
 
257
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} completed.' );
258
 
259
- // Redo after 5 minutes
260
- // wp_schedule_single_event( time() + 300, 'wppa_cleanup' );
261
- // wppa_log( 'Cron', '{b}wppa_cleanup{/b} re-scheduled' );
 
262
  }
263
 
264
  // Activate treecount update proc
@@ -285,6 +300,8 @@ global $wpdb;
285
  return;
286
  }
287
 
 
 
288
  $start = time();
289
 
290
  $albs = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_ALBUMS . "` WHERE `a_parent` < '1' ORDER BY `id`" );
@@ -318,5 +335,4 @@ global $wppa_cron_maintenance_slugs;
318
  wppa_log( 'Cron', '{b}' . $slug . '{/b} re-animated at item {b}#' . $last . '{/b}' );
319
  }
320
  }
321
-
322
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
+ * Version 6.8.04
7
  *
8
  *
9
  */
38
  $delay = 5;
39
  }
40
  else switch ( $slug ) {
 
 
 
41
  case 'wppa_cleanup_index': // 1 hour
42
  $delay = 3600;
43
  break;
44
+ case 'wppa_remake_index_albums':
45
+ $delay = 180;
46
+ break;
47
  default:
48
+ $delay = 10;
49
  }
50
  wp_schedule_single_event( time() + $delay, 'wppa_cron_event', array( $slug ) );
51
  $backtrace = debug_backtrace();
159
  return;
160
  }
161
 
162
+ ob_start();
163
+
164
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} started.' );
165
 
166
+ // Start renew crypt processes if configured socket_accept
167
+ if ( wppa_opt( 'crypt_albums_every' ) ) {
168
+ $last = get_option( 'wppa_crypt_albums_lasttimestamp', '0' );
169
+ if ( $last + wppa_opt( 'crypt_albums_every' ) * 3600 < time() ) {
170
+ wppa_schedule_maintenance_proc( 'wppa_crypt_albums' );
171
+ update_option( 'wppa_crypt_albums_lasttimestamp', time() );
172
+ }
173
+ }
174
+ if ( wppa_opt( 'crypt_photos_every' ) ) {
175
+ $last = get_option( 'wppa_crypt_photos_lasttimestamp', '0' );
176
+ if ( $last + wppa_opt( 'crypt_photos_every' ) * 3600 < time() ) {
177
+ wppa_schedule_maintenance_proc( 'wppa_crypt_photos' );
178
+ update_option( 'wppa_crypt_photos_lasttimestamp', time() );
179
+ }
180
+ }
181
+
182
  // Cleanup session db table
183
  $lifetime = 3600; // Sessions expire after one hour
184
  $savetime = 86400; // Save session data for 24 hour
215
  // Re-create permalink htaccess file
216
  wppa_create_pl_htaccess();
217
 
 
 
 
 
218
  // Retry failed mails
219
  if ( wppa_opt( 'retry_mails' ) ) {
220
 
270
 
271
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} completed.' );
272
 
273
+ $outbuf = ob_get_clean();
274
+ if ( $outbuf ) {
275
+ wppa_log( 'dbg', 'Cron ' . $slug . ' unexpected output: ' . $outbuf );
276
+ }
277
  }
278
 
279
  // Activate treecount update proc
300
  return;
301
  }
302
 
303
+ ob_start();
304
+
305
  $start = time();
306
 
307
  $albs = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_ALBUMS . "` WHERE `a_parent` < '1' ORDER BY `id`" );
335
  wppa_log( 'Cron', '{b}' . $slug . '{/b} re-animated at item {b}#' . $last . '{/b}' );
336
  }
337
  }
 
338
  }
wppa-exif-iptc-common.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
- * version 6.8.02
7
  *
8
  *
9
  */
@@ -185,8 +185,13 @@ global $wppa_exif_error_output;
185
 
186
  // If array, make it readable
187
  if ( is_serialized( $data ) ) {
188
- $data_arr = unserialize( $data );
189
- $data = implode( ', ', $data_arr );
 
 
 
 
 
190
  }
191
  else {
192
  $data_arr = null;
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
+ * version 6.8.04
7
  *
8
  *
9
  */
185
 
186
  // If array, make it readable
187
  if ( is_serialized( $data ) ) {
188
+ $data_arr = @unserialize( $data ); // This may cause Out of memory error
189
+ if ( is_array( $data_arr ) ) {
190
+ $data = implode( ', ', $data_arr );
191
+ }
192
+ else {
193
+ $data_arr = null;
194
+ }
195
  }
196
  else {
197
  $data_arr = null;
wppa-featen-widget.php CHANGED
@@ -21,13 +21,7 @@ class FeaTenWidget extends WP_Widget {
21
  global $wpdb;
22
  global $wppa_opt;
23
 
24
- require_once(dirname(__FILE__) . '/wppa-links.php');
25
- require_once(dirname(__FILE__) . '/wppa-styles.php');
26
- require_once(dirname(__FILE__) . '/wppa-functions.php');
27
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
28
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
29
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
30
- wppa_initialize_runtime();
31
 
32
  extract( $args );
33
  wppa( 'in_widget', 'featen' );
21
  global $wpdb;
22
  global $wppa_opt;
23
 
24
+ wppa_initialize_runtime();
 
 
 
 
 
 
25
 
26
  extract( $args );
27
  wppa( 'in_widget', 'featen' );
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.8.03
7
  *
8
  */
9
 
@@ -227,7 +227,7 @@ global $wppa_session;
227
  }
228
  if ( wppa( 'bestof' ) ) {
229
  $args = wppa( 'bestof_args' );
230
- wppa_bestof_box ( $args );
231
  $out = wppa( 'out' );
232
  wppa_reset_occurrance();
233
  return $out;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.8.04
7
  *
8
  */
9
 
227
  }
228
  if ( wppa( 'bestof' ) ) {
229
  $args = wppa( 'bestof_args' );
230
+ wppa_bestof_box( $args );
231
  $out = wppa( 'out' );
232
  wppa_reset_occurrance();
233
  return $out;
wppa-gp-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * A text widget that interpretes wppa shortcodes
6
  *
7
- * Version 6.7.01
8
  */
9
 
10
  class WppaGpWidget extends WP_Widget {
@@ -16,12 +16,6 @@ class WppaGpWidget extends WP_Widget {
16
 
17
  function widget( $args, $instance ) {
18
 
19
- require_once(dirname(__FILE__) . '/wppa-links.php');
20
- require_once(dirname(__FILE__) . '/wppa-styles.php');
21
- require_once(dirname(__FILE__) . '/wppa-functions.php');
22
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
23
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
24
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
25
  wppa_initialize_runtime();
26
 
27
  extract( $args );
4
  *
5
  * A text widget that interpretes wppa shortcodes
6
  *
7
+ * Version 6.8.04
8
  */
9
 
10
  class WppaGpWidget extends WP_Widget {
16
 
17
  function widget( $args, $instance ) {
18
 
 
 
 
 
 
 
19
  wppa_initialize_runtime();
20
 
21
  extract( $args );
wppa-index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
- * Version 6.8.02
7
  *
8
  *
9
  */
@@ -311,7 +311,7 @@ function wppa_index_string_to_array( $string ) {
311
  $from = $range['0'];
312
  $to = $range['1'];
313
  if ( $from >= $to ) {
314
- wppa_log( 'err', 'Illegal range: ' . $t );
315
  $result[] = $range['0'];
316
  $result[] = $range['1'];
317
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
+ * Version 6.8.04
7
  *
8
  *
9
  */
311
  $from = $range['0'];
312
  $to = $range['1'];
313
  if ( $from >= $to ) {
314
+ wppa_log( 'err', 'Illegal range: ' . $t, true );
315
  $result[] = $range['0'];
316
  $result[] = $range['1'];
317
  }
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.09
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
@@ -55,6 +55,14 @@ require_once 'wppa-cron.php';
55
  require_once 'wppa-maintenance.php';
56
  require_once 'wppa-tinymce-common.php';
57
 
 
 
 
 
 
 
 
 
58
  /* Load cloudinary if configured and php version >= 5.3 */
59
  if ( PHP_VERSION_ID >= 50300 ) require_once 'wppa-cloudinary.php';
60
 
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 6.8.04
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
55
  require_once 'wppa-maintenance.php';
56
  require_once 'wppa-tinymce-common.php';
57
 
58
+ /* Required for widget displays at back-end */
59
+ require_once 'wppa-links.php';
60
+ require_once 'wppa-styles.php';
61
+ require_once 'wppa-functions.php';
62
+ require_once 'wppa-thumbnails.php';
63
+ require_once 'wppa-boxes-html.php';
64
+ require_once 'wppa-slideshow.php';
65
+
66
  /* Load cloudinary if configured and php version >= 5.3 */
67
  if ( PHP_VERSION_ID >= 50300 ) require_once 'wppa-cloudinary.php';
68
 
wppa-lasten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
- * Version 6.7.01
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
@@ -19,12 +19,6 @@ class LasTenWidget extends WP_Widget {
19
  global $wpdb;
20
  global $wppa_opt;
21
 
22
- require_once(dirname(__FILE__) . '/wppa-links.php');
23
- require_once(dirname(__FILE__) . '/wppa-styles.php');
24
- require_once(dirname(__FILE__) . '/wppa-functions.php');
25
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
26
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
27
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
28
  wppa_initialize_runtime();
29
 
30
  wppa( 'in_widget', 'lasten' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
+ * Version 6.8.04
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
19
  global $wpdb;
20
  global $wppa_opt;
21
 
 
 
 
 
 
 
22
  wppa_initialize_runtime();
23
 
24
  wppa( 'in_widget', 'lasten' );
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 6.8.02
7
  *
8
  */
9
 
@@ -72,6 +72,8 @@ $wppa_cron_maintenance_slugs = array( 'wppa_remake_index_albums',
72
  'wppa_comp_sizes',
73
  'wppa_add_gpx_tag',
74
  'wppa_add_hd_tag',
 
 
75
 
76
  );
77
 
@@ -90,6 +92,16 @@ global $wppa_timestamp_start;
90
  return;
91
  }
92
 
 
 
 
 
 
 
 
 
 
 
93
  /*
94
  // Check for multiple maintenance procs
95
  if ( ! wppa_switch( 'maint_ignore_concurrency_error' ) && ! wppa_is_cron() ) {
@@ -103,6 +115,11 @@ global $wppa_timestamp_start;
103
  }
104
  }
105
  */
 
 
 
 
 
106
  // Lock this proc
107
  if ( wppa_is_cron() ) {
108
  update_option( $slug.'_user', 'cron-job' );
@@ -843,7 +860,9 @@ global $wppa_timestamp_start;
843
  }
844
  else { // Nothing to do, Done anyway
845
  $lastid = $topid;
846
- wppa_log( wppa_is_cron() ? 'Cron' : 'Obs', 'Maintenance proc {b}' . $slug . '{/b} Done!' );
 
 
847
  }
848
  break; // End process photos
849
 
@@ -1117,12 +1136,21 @@ global $wppa_timestamp_start;
1117
  if ( get_option( $slug . '_ad_inf' ) == 'yes' ) {
1118
  wppa_schedule_maintenance_proc( $slug );
1119
  }
1120
- return;
 
 
 
 
 
 
 
 
 
1121
  }
1122
  else {
 
1123
  return $errtxt.'||'.$slug.'||'.$status.'||'.$togo.'||'.$reload;
1124
  }
1125
-
1126
  }
1127
 
1128
  function wppa_do_maintenance_popup( $slug ) {
@@ -1169,6 +1197,7 @@ global $wppa_log_file;
1169
  <table>
1170
  <thead>
1171
  <tr>
 
1172
  <th><span style="float:left;" >Word</span></th>
1173
  <th style="max-width:400px;" ><span style="float:left;" >Albums</span></th>
1174
  <th><span style="float:left;" >Photos</span></th>
@@ -1180,6 +1209,7 @@ global $wppa_log_file;
1180
  foreach ( $indexes as $index ) {
1181
  $result .= '
1182
  <tr>
 
1183
  <td>'.$index['slug'].'</td>
1184
  <td style="max-width:400px; word-wrap: break-word;" >'.$index['albums'].'</td>
1185
  <td>'.$index['photos'].'</td>
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.8.04
7
  *
8
  */
9
 
72
  'wppa_comp_sizes',
73
  'wppa_add_gpx_tag',
74
  'wppa_add_hd_tag',
75
+ 'wppa_crypt_photos',
76
+ 'wppa_crypt_albums',
77
 
78
  );
79
 
92
  return;
93
  }
94
 
95
+ // If we do clean index by cron and remake index still active, reschedule and give up
96
+ if ( wppa_is_cron() && $slug == 'wppa_cleanup_index' ) {
97
+ if ( get_option( 'wppa_remake_index_photos_user', false ) || get_option( 'wppa_remake_index_albums_user', false ) ) {
98
+ wppa_log( 'cron', '{b}' . $slug . '{/b} delayed' );
99
+ wppa_schedule_maintenance_proc( $slug );
100
+ update_option( 'wppa_cleanup_index_status', 'Delayed' );
101
+ return;
102
+ }
103
+ }
104
+
105
  /*
106
  // Check for multiple maintenance procs
107
  if ( ! wppa_switch( 'maint_ignore_concurrency_error' ) && ! wppa_is_cron() ) {
115
  }
116
  }
117
  */
118
+ // Open output buffering if cron
119
+ if ( wppa_is_cron() ) {
120
+ ob_start();
121
+ }
122
+
123
  // Lock this proc
124
  if ( wppa_is_cron() ) {
125
  update_option( $slug.'_user', 'cron-job' );
860
  }
861
  else { // Nothing to do, Done anyway
862
  $lastid = $topid;
863
+ if ( ! wppa_is_cron() ) {
864
+ wppa_log( 'Obs', 'Maintenance proc {b}' . $slug . '{/b} Done!' );
865
+ }
866
  }
867
  break; // End process photos
868
 
1136
  if ( get_option( $slug . '_ad_inf' ) == 'yes' ) {
1137
  wppa_schedule_maintenance_proc( $slug );
1138
  }
1139
+
1140
+ // Log any unexpected output
1141
+ $outbuf = ob_get_clean();
1142
+ if ( $outbuf ) {
1143
+ wppa_log( 'dbg', 'Cron ' . $slug . ' unexpected output: ' . $outbuf );
1144
+ }
1145
+
1146
+ // // To prevent: End of script output before headers: wp-cron.php
1147
+ // header( "HTTP/1.0 200 OK" );
1148
+ // exit( 0 ); // return;
1149
  }
1150
  else {
1151
+ // header( "HTTP/1.0 200 OK" );
1152
  return $errtxt.'||'.$slug.'||'.$status.'||'.$togo.'||'.$reload;
1153
  }
 
1154
  }
1155
 
1156
  function wppa_do_maintenance_popup( $slug ) {
1197
  <table>
1198
  <thead>
1199
  <tr>
1200
+ <th><span style="float:left;" >Id</span></th>
1201
  <th><span style="float:left;" >Word</span></th>
1202
  <th style="max-width:400px;" ><span style="float:left;" >Albums</span></th>
1203
  <th><span style="float:left;" >Photos</span></th>
1209
  foreach ( $indexes as $index ) {
1210
  $result .= '
1211
  <tr>
1212
+ <td>'.$index['id'].'</td>
1213
  <td>'.$index['slug'].'</td>
1214
  <td style="max-width:400px; word-wrap: break-word;" >'.$index['albums'].'</td>
1215
  <td>'.$index['photos'].'</td>
wppa-multitag-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
- * Version 6.7.09
7
  *
8
  */
9
 
@@ -29,12 +29,6 @@ class MultitagPhotos extends WP_Widget {
29
  wppa( 'in_widget', 'multitag' );
30
  wppa_bump_mocc();
31
 
32
- require_once(dirname(__FILE__) . '/wppa-links.php');
33
- require_once(dirname(__FILE__) . '/wppa-styles.php');
34
- require_once(dirname(__FILE__) . '/wppa-functions.php');
35
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
36
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
37
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
38
  wppa_initialize_runtime();
39
 
40
  extract( $args );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
+ * Version 6.8.04
7
  *
8
  */
9
 
29
  wppa( 'in_widget', 'multitag' );
30
  wppa_bump_mocc();
31
 
 
 
 
 
 
 
32
  wppa_initialize_runtime();
33
 
34
  extract( $args );
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.8.02
7
  *
8
  */
9
 
@@ -11,15 +11,9 @@ if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
11
 
12
  /* API FILTER and FUNCTIONS */
13
  require_once 'wppa-filter.php';
14
- require_once 'wppa-slideshow.php';
15
- require_once 'wppa-functions.php';
16
  require_once 'wppa-breadcrumb.php';
17
  require_once 'wppa-album-covers.php';
18
- require_once 'wppa-links.php';
19
- require_once 'wppa-boxes-html.php';
20
- require_once 'wppa-styles.php';
21
  require_once 'wppa-cart.php';
22
- require_once 'wppa-thumbnails.php';
23
  require_once 'wppa-picture.php';
24
  require_once 'wppa-tinymce-photo-front.php';
25
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.8.04
7
  *
8
  */
9
 
11
 
12
  /* API FILTER and FUNCTIONS */
13
  require_once 'wppa-filter.php';
 
 
14
  require_once 'wppa-breadcrumb.php';
15
  require_once 'wppa-album-covers.php';
 
 
 
16
  require_once 'wppa-cart.php';
 
17
  require_once 'wppa-picture.php';
18
  require_once 'wppa-tinymce-photo-front.php';
19
 
wppa-potd-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
- * Version 6.7.01
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -23,12 +23,6 @@ class PhotoOfTheDay extends WP_Widget {
23
  wppa( 'in_widget', 'potd' );
24
  wppa_bump_mocc();
25
 
26
- require_once(dirname(__FILE__) . '/wppa-links.php');
27
- require_once(dirname(__FILE__) . '/wppa-styles.php');
28
- require_once(dirname(__FILE__) . '/wppa-functions.php');
29
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
30
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
31
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
32
  wppa_initialize_runtime();
33
 
34
  extract( $args );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
+ * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
23
  wppa( 'in_widget', 'potd' );
24
  wppa_bump_mocc();
25
 
 
 
 
 
 
 
26
  wppa_initialize_runtime();
27
 
28
  extract( $args );
wppa-qr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
- * Version 6.8.00
7
  */
8
 
9
 
@@ -20,13 +20,7 @@ class wppaQRWidget extends WP_Widget {
20
  global $wpdb;
21
  global $widget_content;
22
 
23
- require_once(dirname(__FILE__) . '/wppa-links.php');
24
- require_once(dirname(__FILE__) . '/wppa-styles.php');
25
- require_once(dirname(__FILE__) . '/wppa-functions.php');
26
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
27
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
28
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
29
- wppa_initialize_runtime();
30
 
31
  extract( $args );
32
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
+ * Version 6.8.04
7
  */
8
 
9
 
20
  global $wpdb;
21
  global $widget_content;
22
 
23
+ wppa_initialize_runtime();
 
 
 
 
 
 
24
 
25
  extract( $args );
26
 
wppa-search-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
- * Version 6.7.03
7
  *
8
  */
9
 
@@ -22,12 +22,6 @@ class SearchPhotos extends WP_Widget {
22
  global $widget_content;
23
  global $wpdb;
24
 
25
- require_once( dirname( __FILE__ ) . '/wppa-links.php' );
26
- require_once( dirname( __FILE__ ) . '/wppa-styles.php' );
27
- require_once( dirname( __FILE__ ) . '/wppa-functions.php' );
28
- require_once( dirname( __FILE__ ) . '/wppa-thumbnails.php' );
29
- require_once( dirname( __FILE__ ) . '/wppa-boxes-html.php' );
30
- require_once( dirname( __FILE__ ) . '/wppa-slideshow.php' );
31
  wppa_initialize_runtime();
32
 
33
  wppa( 'mocc', wppa( 'mocc' ) + 1 );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
+ * Version 6.8.04
7
  *
8
  */
9
 
22
  global $widget_content;
23
  global $wpdb;
24
 
 
 
 
 
 
 
25
  wppa_initialize_runtime();
26
 
27
  wppa( 'mocc', wppa( 'mocc' ) + 1 );
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.8.02
7
  *
8
  */
9
 
@@ -4906,8 +4906,8 @@ global $wppa_supported_camara_brands;
4906
  $desc = __('The fade-in time of the lightbox images', 'wp-photo-album-plus');
4907
  $help = '';
4908
  $slug = 'wppa_ovl_anim';
4909
- $options = array(__('--- off ---', 'wp-photo-album-plus'), '200 ms.', '400 ms.', '800 ms.', '1.2 s.', '2 s.', '4 s.');
4910
- $values = array('10', '200', '400', '800', '1200', '2000', '4000');
4911
  $html = wppa_select($slug, $options, $values);
4912
  $clas = '';
4913
  $tags = 'lightbox';
@@ -7417,7 +7417,7 @@ global $wppa_supported_camara_brands;
7417
  $desc = __('Renew album encrcryption codes.', 'wp-photo-album-plus');
7418
  $help = '';
7419
  $slug2 = 'wppa_crypt_albums';
7420
- $html1 = '';
7421
  $html2 = wppa_maintenance_button( $slug2 );
7422
  $html3 = wppa_status_field( $slug2 );
7423
  $html4 = wppa_togo_field( $slug2 );
@@ -7426,11 +7426,27 @@ global $wppa_supported_camara_brands;
7426
  $tags = 'system';
7427
  wppa_setting(false, '13', $name, $desc, $html, $help, $clas, $tags);
7428
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7429
  $name = __('Renew photo crypt', 'wp-photo-album-plus');
7430
  $desc = __('Renew photo encrcryption codes.', 'wp-photo-album-plus');
7431
  $help = '';
7432
  $slug2 = 'wppa_crypt_photos';
7433
- $html1 = '';
7434
  $html2 = wppa_maintenance_button( $slug2 );
7435
  $html3 = wppa_status_field( $slug2 );
7436
  $html4 = wppa_togo_field( $slug2 );
@@ -7439,6 +7455,22 @@ global $wppa_supported_camara_brands;
7439
  $tags = 'system';
7440
  wppa_setting(false, '14', $name, $desc, $html, $help, $clas, $tags);
7441
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7442
  $name = __('Create orietation sources', 'wp-photo-album-plus');
7443
  $desc = __('Creates correctly oriented pseudo source file.', 'wp-photo-album-plus');
7444
  $help = '';
@@ -8748,7 +8780,7 @@ global $wppa_supported_camara_brands;
8748
  $help = esc_js(__('You may select multiple albums. All logged in visitors will get their own sub-album in each granted parent.', 'wp-photo-album-plus'));
8749
  $slug = 'wppa_grant_parent';
8750
  $opts = array( __('--- none ---', 'wp-photo-album-plus'), __('--- separate ---', 'wp-photo-album-plus') );
8751
- $vals = array( '0', '-1');
8752
  $albs = $wpdb->get_results( "SELECT `id`, `name` FROM`" . WPPA_ALBUMS . "` ORDER BY `name`", ARRAY_A );
8753
  if ( $albs ) {
8754
  foreach ( $albs as $alb ) {
@@ -8756,7 +8788,7 @@ global $wppa_supported_camara_brands;
8756
  $vals[] = $alb['id'];
8757
  }
8758
  }
8759
- $html = wppa_select_m($slug, $opts, $vals, '', '', true);
8760
  $clas = '';
8761
  $tags = 'system,album';
8762
  wppa_setting($slug, '11.1', $name, $desc, $html, $help, $clas, $tags);
@@ -11136,7 +11168,7 @@ function wppa_color_box( $xslug ) {
11136
 
11137
  }
11138
 
11139
- function wppa_doit_button( $label = '', $key = '', $sub = '', $height = '16', $fontsize = '11' ) {
11140
  if ( $label == '' ) $label = __('Do it!', 'wp-photo-album-plus');
11141
 
11142
  $result = '<input type="submit" class="button-primary" style="float:left; font-size:'.$fontsize.'px; height:'.$height.'px; margin: 0 4px; padding: 0px; line-height:12px;"';
@@ -11152,7 +11184,7 @@ function wppa_doit_button( $label = '', $key = '', $sub = '', $height = '16', $f
11152
  function wppa_popup_button( $slug ) {
11153
 
11154
  $label = __('Show!', 'wp-photo-album-plus');
11155
- $result = '<input type="button" class="button-secundary" style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0px;" value="'.$label.'"';
11156
  $result .= ' onclick="wppaAjaxPopupWindow(\''.$slug.'\')" />';
11157
 
11158
  return $result;
@@ -11161,7 +11193,7 @@ function wppa_popup_button( $slug ) {
11161
  function wppa_ajax_button( $label = '', $slug, $elmid = '0', $no_confirm = false ) {
11162
  if ( $label == '' ) $label = __('Do it!', 'wp-photo-album-plus');
11163
 
11164
- $result = '<input type="button" class="button-secundary" style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0px;" value="'.$label.'"';
11165
  $result .= ' onclick="';
11166
  if ( ! $no_confirm ) $result .= 'if (confirm(\''.__('Are you sure?', 'wp-photo-album-plus').'\')) ';
11167
  if ( $elmid ) {
@@ -11202,7 +11234,7 @@ function wppa_cronjob_button( $slug ) {
11202
  ' type="button"' .
11203
  ' class="button-secundary"' .
11204
  ' style="float:left;border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;' . ( $crashed ? 'color:red;': '' ) . '"' .
11205
- ' value="' . esc_attr( $label ) . '"';
11206
  if ( ! $locked ) {
11207
  $result .= ' onclick="if ( jQuery(\'#'.$slug.'_status\').html() != \'\' || confirm(\'Are you sure ?\') ) wppaMaintenanceProc(\''.$slug.'\', false, true);" />';
11208
  }
@@ -11229,7 +11261,7 @@ function wppa_maintenance_button( $slug ) {
11229
  $locked = false;
11230
  }
11231
 
11232
- $result = '<input id="'.$slug.'_button" type="button" class="button-secundary" style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0px;" value="'.$label.'"';
11233
  if ( ! $locked ) {
11234
  $result .= ' onclick="if ( jQuery(\'#'.$slug.'_status\').html() != \'\' || confirm(\'Are you sure ?\') ) wppaMaintenanceProc(\''.$slug.'\', false);" />';
11235
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.8.04
7
  *
8
  */
9
 
4906
  $desc = __('The fade-in time of the lightbox images', 'wp-photo-album-plus');
4907
  $help = '';
4908
  $slug = 'wppa_ovl_anim';
4909
+ $options = array(__('--- off ---', 'wp-photo-album-plus'), '200 ms.', '300 ms.', '400 ms.', '800 ms.', '1.2 s.', '2 s.', '4 s.');
4910
+ $values = array('10', '200', '300', '400', '800', '1200', '2000', '4000');
4911
  $html = wppa_select($slug, $options, $values);
4912
  $clas = '';
4913
  $tags = 'lightbox';
7417
  $desc = __('Renew album encrcryption codes.', 'wp-photo-album-plus');
7418
  $help = '';
7419
  $slug2 = 'wppa_crypt_albums';
7420
+ $html1 = wppa_cronjob_button( $slug2 );
7421
  $html2 = wppa_maintenance_button( $slug2 );
7422
  $html3 = wppa_status_field( $slug2 );
7423
  $html4 = wppa_togo_field( $slug2 );
7426
  $tags = 'system';
7427
  wppa_setting(false, '13', $name, $desc, $html, $help, $clas, $tags);
7428
 
7429
+ $name = __('Renew album crypt every', 'wp-photo-album-plus');
7430
+ $desc = __('Renew cryptic codes periodically', 'wp-photo-album-plus');
7431
+ $help = __('The periodic times are an approximation', 'wp-photo-album-plus');
7432
+ $slug = 'wppa_crypt_albums_every';
7433
+ $opts = array( __('--- off ---', 'wp-photo-album-plus'),
7434
+ __('hour', 'wp-photo-album-plus'),
7435
+ __('day', 'wp-photo-album-plus'),
7436
+ __('week', 'wp-photo-album-plus'),
7437
+ __('month', 'wp-photo-album-plus'),
7438
+ );
7439
+ $vals = array( '0', '1', '24', '168', '720' );
7440
+ $html = wppa_select( $slug, $opts, $vals ) . '<td></td><td></td><td></td>';
7441
+ $clas = '';
7442
+ $tags = 'system';
7443
+ wppa_setting(false, '13.1', $name, $desc, $html, $help, $clas, $tags);
7444
+
7445
  $name = __('Renew photo crypt', 'wp-photo-album-plus');
7446
  $desc = __('Renew photo encrcryption codes.', 'wp-photo-album-plus');
7447
  $help = '';
7448
  $slug2 = 'wppa_crypt_photos';
7449
+ $html1 = wppa_cronjob_button( $slug2 );
7450
  $html2 = wppa_maintenance_button( $slug2 );
7451
  $html3 = wppa_status_field( $slug2 );
7452
  $html4 = wppa_togo_field( $slug2 );
7455
  $tags = 'system';
7456
  wppa_setting(false, '14', $name, $desc, $html, $help, $clas, $tags);
7457
 
7458
+ $name = __('Renew photo crypt every', 'wp-photo-album-plus');
7459
+ $desc = __('Renew cryptic codes periodically', 'wp-photo-album-plus');
7460
+ $help = __('The periodic times are an approximation', 'wp-photo-album-plus');
7461
+ $slug = 'wppa_crypt_photos_every';
7462
+ $opts = array( __('--- off ---', 'wp-photo-album-plus'),
7463
+ __('hour', 'wp-photo-album-plus'),
7464
+ __('day', 'wp-photo-album-plus'),
7465
+ __('week', 'wp-photo-album-plus'),
7466
+ __('month', 'wp-photo-album-plus'),
7467
+ );
7468
+ $vals = array( '0', '1', '24', '168', '720' );
7469
+ $html = wppa_select( $slug, $opts, $vals ) . '<td></td><td></td><td></td>';
7470
+ $clas = '';
7471
+ $tags = 'system';
7472
+ wppa_setting(false, '14.1', $name, $desc, $html, $help, $clas, $tags);
7473
+
7474
  $name = __('Create orietation sources', 'wp-photo-album-plus');
7475
  $desc = __('Creates correctly oriented pseudo source file.', 'wp-photo-album-plus');
7476
  $help = '';
8780
  $help = esc_js(__('You may select multiple albums. All logged in visitors will get their own sub-album in each granted parent.', 'wp-photo-album-plus'));
8781
  $slug = 'wppa_grant_parent';
8782
  $opts = array( __('--- none ---', 'wp-photo-album-plus'), __('--- separate ---', 'wp-photo-album-plus') );
8783
+ $vals = array( 'zero', '-1');
8784
  $albs = $wpdb->get_results( "SELECT `id`, `name` FROM`" . WPPA_ALBUMS . "` ORDER BY `name`", ARRAY_A );
8785
  if ( $albs ) {
8786
  foreach ( $albs as $alb ) {
8788
  $vals[] = $alb['id'];
8789
  }
8790
  }
8791
+ $html = wppa_select_m($slug, $opts, $vals);//, '', '', true);
8792
  $clas = '';
8793
  $tags = 'system,album';
8794
  wppa_setting($slug, '11.1', $name, $desc, $html, $help, $clas, $tags);
11168
 
11169
  }
11170
 
11171
+ function wppa_doit_button( $label = '', $key = '', $sub = '', $height = '18', $fontsize = '11' ) {
11172
  if ( $label == '' ) $label = __('Do it!', 'wp-photo-album-plus');
11173
 
11174
  $result = '<input type="submit" class="button-primary" style="float:left; font-size:'.$fontsize.'px; height:'.$height.'px; margin: 0 4px; padding: 0px; line-height:12px;"';
11184
  function wppa_popup_button( $slug ) {
11185
 
11186
  $label = __('Show!', 'wp-photo-album-plus');
11187
+ $result = '<input type="button" class="button-secundary" style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0px;" value="&nbsp;'.esc_attr($label).'&nbsp;"';
11188
  $result .= ' onclick="wppaAjaxPopupWindow(\''.$slug.'\')" />';
11189
 
11190
  return $result;
11193
  function wppa_ajax_button( $label = '', $slug, $elmid = '0', $no_confirm = false ) {
11194
  if ( $label == '' ) $label = __('Do it!', 'wp-photo-album-plus');
11195
 
11196
+ $result = '<input type="button" class="button-secundary" style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0px;" value="&nbsp;'.esc_attr($label).'&nbsp;"';
11197
  $result .= ' onclick="';
11198
  if ( ! $no_confirm ) $result .= 'if (confirm(\''.__('Are you sure?', 'wp-photo-album-plus').'\')) ';
11199
  if ( $elmid ) {
11234
  ' type="button"' .
11235
  ' class="button-secundary"' .
11236
  ' style="float:left;border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;' . ( $crashed ? 'color:red;': '' ) . '"' .
11237
+ ' value="&nbsp;' . esc_attr( $label ) . '&nbsp;"';
11238
  if ( ! $locked ) {
11239
  $result .= ' onclick="if ( jQuery(\'#'.$slug.'_status\').html() != \'\' || confirm(\'Are you sure ?\') ) wppaMaintenanceProc(\''.$slug.'\', false, true);" />';
11240
  }
11261
  $locked = false;
11262
  }
11263
 
11264
+ $result = '<input id="'.$slug.'_button" type="button" class="button-secundary" style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0px;" value="&nbsp;'.esc_attr($label).'&nbsp;"';
11265
  if ( ! $locked ) {
11266
  $result .= ' onclick="if ( jQuery(\'#'.$slug.'_status\').html() != \'\' || confirm(\'Are you sure ?\') ) wppaMaintenanceProc(\''.$slug.'\', false);" />';
11267
  }
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.8.03
7
  *
8
  */
9
 
@@ -170,7 +170,7 @@ global $silent;
170
  id bigint(20) NOT NULL AUTO_INCREMENT,
171
  slug tinytext NOT NULL,
172
  albums text NOT NULL,
173
- photos text NOT NULL,
174
  PRIMARY KEY (id),
175
  KEY slugkey (slug(20))
176
  ) DEFAULT CHARACTER SET utf8;";
@@ -1522,7 +1522,9 @@ Hide Camera info
1522
  'wppa_errorlog_purge' => '',
1523
  'wppa_comp_sizes' => '',
1524
  'wppa_crypt_photos' => '',
 
1525
  'wppa_crypt_albums' => '',
 
1526
  'wppa_create_o1_files' => '',
1527
  'wppa_create_o1_files_skip_one' => '',
1528
  'wppa_owner_to_name_proc' => '',
@@ -2028,8 +2030,16 @@ static $user;
2028
 
2029
  // Album ids are and expanded enumeration sep by , in the setting
2030
  $grant_parents = explode( ',', wppa_opt( 'grant_parent' ) );
2031
- if ( ! is_array( $grant_parents ) ) {
2032
- $grant_parents = array( '0' );
 
 
 
 
 
 
 
 
2033
  }
2034
  break;
2035
 
@@ -2040,7 +2050,10 @@ static $user;
2040
  "FROM `" . WPPA_ALBUMS . "` " .
2041
  "WHERE `cats` LIKE '%," . wppa_opt( 'grant_parent' ) . ",%'"
2042
  );
2043
-
 
 
 
2044
  break;
2045
 
2046
  case 'indexsearch':
@@ -2050,6 +2063,10 @@ static $user;
2050
  );
2051
 
2052
  $grant_parents = explode( '.', wppa_expand_enum( $temp ) );
 
 
 
 
2053
  break;
2054
 
2055
  }
@@ -2075,12 +2092,12 @@ static $user;
2075
  }
2076
 
2077
  // If a parent is given and it is not a grant parent, quit
2078
- if ( $xparent && ! in_array( $xparent, $grant_parents ) ) {
2079
  return false;
2080
  }
2081
 
2082
  // If a parent is given, it will now be a grant parent (see directly above), only create the granted album inside this parent.
2083
- if ( $xparent ) {
2084
  $parents = array( $xparent );
2085
  }
2086
  // Else create granted albums for all grant parents
@@ -2096,7 +2113,7 @@ static $user;
2096
  foreach( $parents as $parent ) {
2097
 
2098
  // Create only grant album if: parent is either -1 or existing
2099
- if ( $parent == '-1' || wppa_album_exists( $parent ) ) {
2100
  if ( ! in_array( $parent, $my_albs_parents, true ) ) {
2101
 
2102
  // make an album for this user
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.8.04
7
  *
8
  */
9
 
170
  id bigint(20) NOT NULL AUTO_INCREMENT,
171
  slug tinytext NOT NULL,
172
  albums text NOT NULL,
173
+ photos mediumtext NOT NULL,
174
  PRIMARY KEY (id),
175
  KEY slugkey (slug(20))
176
  ) DEFAULT CHARACTER SET utf8;";
1522
  'wppa_errorlog_purge' => '',
1523
  'wppa_comp_sizes' => '',
1524
  'wppa_crypt_photos' => '',
1525
+ 'wppa_crypt_photos_every' => '0',
1526
  'wppa_crypt_albums' => '',
1527
+ 'wppa_crypt_albums_every' => '0',
1528
  'wppa_create_o1_files' => '',
1529
  'wppa_create_o1_files_skip_one' => '',
1530
  'wppa_owner_to_name_proc' => '',
2030
 
2031
  // Album ids are and expanded enumeration sep by , in the setting
2032
  $grant_parents = explode( ',', wppa_opt( 'grant_parent' ) );
2033
+ if ( empty( $grant_parents ) ) {
2034
+ // Selection box method chosen, but no album(s) selected
2035
+ return array();
2036
+ }
2037
+ else {
2038
+ foreach( array_keys( $grant_parents ) as $key ) {
2039
+ if ( $grant_parents[$key] == 'zero' ) {
2040
+ $grant_parents[$key] = '0';
2041
+ }
2042
+ }
2043
  }
2044
  break;
2045
 
2050
  "FROM `" . WPPA_ALBUMS . "` " .
2051
  "WHERE `cats` LIKE '%," . wppa_opt( 'grant_parent' ) . ",%'"
2052
  );
2053
+ if ( empty( $grant_parents ) ) {
2054
+ // Selection set to category, but no albums exist with that category
2055
+ return array();
2056
+ }
2057
  break;
2058
 
2059
  case 'indexsearch':
2063
  );
2064
 
2065
  $grant_parents = explode( '.', wppa_expand_enum( $temp ) );
2066
+ if ( empty( $grant_parents ) ) {
2067
+ // Selection set to indexsearch but no albums found matching the search criteria
2068
+ return array();
2069
+ }
2070
  break;
2071
 
2072
  }
2092
  }
2093
 
2094
  // If a parent is given and it is not a grant parent, quit
2095
+ if ( $xparent !== false && ! in_array( $xparent, $grant_parents ) ) {
2096
  return false;
2097
  }
2098
 
2099
  // If a parent is given, it will now be a grant parent (see directly above), only create the granted album inside this parent.
2100
+ if ( $xparent !== false ) {
2101
  $parents = array( $xparent );
2102
  }
2103
  // Else create granted albums for all grant parents
2113
  foreach( $parents as $parent ) {
2114
 
2115
  // Create only grant album if: parent is either -1 or existing
2116
+ if ( $parent == '-1' || $parent == '0' || wppa_album_exists( $parent ) ) {
2117
  if ( ! in_array( $parent, $my_albs_parents, true ) ) {
2118
 
2119
  // make an album for this user
wppa-stereo-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
- * Version 6.7.01
7
  */
8
 
9
  class wppaStereoWidget extends WP_Widget {
@@ -18,12 +18,6 @@ class wppaStereoWidget extends WP_Widget {
18
  function widget( $args, $instance ) {
19
  global $wpdb;
20
 
21
- require_once(dirname(__FILE__) . '/wppa-links.php');
22
- require_once(dirname(__FILE__) . '/wppa-styles.php');
23
- require_once(dirname(__FILE__) . '/wppa-functions.php');
24
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
25
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
26
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
27
  wppa_initialize_runtime();
28
 
29
  wppa( 'in_widget', 'stereo' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
+ * Version 6.8.04
7
  */
8
 
9
  class wppaStereoWidget extends WP_Widget {
18
  function widget( $args, $instance ) {
19
  global $wpdb;
20
 
 
 
 
 
 
 
21
  wppa_initialize_runtime();
22
 
23
  wppa( 'in_widget', 'stereo' );
wppa-super-view-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * ask the album / display you want
6
- * Version 6.7.01
7
  */
8
 
9
 
@@ -20,12 +20,6 @@ class WppaSuperView extends WP_Widget {
20
  global $wpdb;
21
  global $widget_content;
22
 
23
- require_once(dirname(__FILE__) . '/wppa-links.php');
24
- require_once(dirname(__FILE__) . '/wppa-styles.php');
25
- require_once(dirname(__FILE__) . '/wppa-functions.php');
26
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
27
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
28
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
29
  wppa_initialize_runtime();
30
 
31
  extract( $args );
3
  * Package: wp-photo-album-plus
4
  *
5
  * ask the album / display you want
6
+ * Version 6.8.04
7
  */
8
 
9
 
20
  global $wpdb;
21
  global $widget_content;
22
 
 
 
 
 
 
 
23
  wppa_initialize_runtime();
24
 
25
  extract( $args );
wppa-tagcloud-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the tagcloud widget
6
- * Version 6.7.01
7
  *
8
  */
9
 
@@ -19,12 +19,6 @@ class TagcloudPhotos extends WP_Widget {
19
  function widget($args, $instance) {
20
  global $widget_content;
21
 
22
- require_once(dirname(__FILE__) . '/wppa-links.php');
23
- require_once(dirname(__FILE__) . '/wppa-styles.php');
24
- require_once(dirname(__FILE__) . '/wppa-functions.php');
25
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
26
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
27
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
28
  wppa_initialize_runtime();
29
 
30
  wppa( 'in_widget', 'tagcloud' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the tagcloud widget
6
+ * Version 6.8.04
7
  *
8
  */
9
 
19
  function widget($args, $instance) {
20
  global $widget_content;
21
 
 
 
 
 
 
 
22
  wppa_initialize_runtime();
23
 
24
  wppa( 'in_widget', 'tagcloud' );
wppa-thumbnail-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail photos
6
- * Version 6.7.01
7
  */
8
 
9
  class ThumbnailWidget extends WP_Widget {
@@ -19,12 +19,6 @@ class ThumbnailWidget extends WP_Widget {
19
 
20
  global $wpdb;
21
 
22
- require_once(dirname(__FILE__) . '/wppa-links.php');
23
- require_once(dirname(__FILE__) . '/wppa-styles.php');
24
- require_once(dirname(__FILE__) . '/wppa-functions.php');
25
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
26
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
27
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
28
  wppa_initialize_runtime();
29
 
30
  wppa( 'in_widget', 'tn' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail photos
6
+ * Version 6.8.04
7
  */
8
 
9
  class ThumbnailWidget extends WP_Widget {
19
 
20
  global $wpdb;
21
 
 
 
 
 
 
 
22
  wppa_initialize_runtime();
23
 
24
  wppa( 'in_widget', 'tn' );
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 6.7.02
9
  *
10
  */
11
 
@@ -524,6 +524,9 @@ global $wpdb;
524
  else {
525
 
526
  // Open the subtext container
 
 
 
527
  $margtop = wppa_switch( 'align_thumbtext' ) ? '' : 'margin-top:'.-$imgmarginbottom.'px;';
528
  $subtextcontheight = $frameheight - max( $imgwidth,$imgheight );
529
  if ( ! wppa_switch( 'align_thumbtext' ) ) $subtextcontheight += $imgmarginbottom;
@@ -1883,7 +1886,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
 
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 6.8.04
9
  *
10
  */
11
 
524
  else {
525
 
526
  // Open the subtext container
527
+ if ( ! $imgmarginbottom ) {
528
+ $imgmarginbottom = '0';
529
+ }
530
  $margtop = wppa_switch( 'align_thumbtext' ) ? '' : 'margin-top:'.-$imgmarginbottom.'px;';
531
  $subtextcontheight = $frameheight - max( $imgwidth,$imgheight );
532
  if ( ! wppa_switch( 'align_thumbtext' ) ) $subtextcontheight += $imgmarginbottom;
1886
 
1887
  $result .= '</div>';
1888
  }
1889
+
1890
  wppa_out( $result );
1891
  }
1892
 
wppa-topten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
- * Version 6.7.01
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
@@ -18,12 +18,6 @@ class TopTenWidget extends WP_Widget {
18
  function widget($args, $instance) {
19
  global $wpdb;
20
 
21
- require_once(dirname(__FILE__) . '/wppa-links.php');
22
- require_once(dirname(__FILE__) . '/wppa-styles.php');
23
- require_once(dirname(__FILE__) . '/wppa-functions.php');
24
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
25
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
26
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
27
  wppa_initialize_runtime();
28
 
29
  wppa( 'in_widget', 'topten' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
+ * Version 6.8.04
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
18
  function widget($args, $instance) {
19
  global $wpdb;
20
 
 
 
 
 
 
 
21
  wppa_initialize_runtime();
22
 
23
  wppa( 'in_widget', 'topten' );
wppa-upldr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
- * Version 6.7.01
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -20,12 +20,6 @@ class UpldrWidget extends WP_Widget {
20
  function widget($args, $instance) {
21
  global $wpdb;
22
 
23
- require_once(dirname(__FILE__) . '/wppa-links.php');
24
- require_once(dirname(__FILE__) . '/wppa-styles.php');
25
- require_once(dirname(__FILE__) . '/wppa-functions.php');
26
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
27
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
28
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
29
  wppa_initialize_runtime();
30
 
31
  wppa( 'in_widget', 'upldr' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
+ * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
20
  function widget($args, $instance) {
21
  global $wpdb;
22
 
 
 
 
 
 
 
23
  wppa_initialize_runtime();
24
 
25
  wppa( 'in_widget', 'upldr' );
wppa-upload-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * A wppa widget to upload photos
6
  *
7
- * Version 6.7.01
8
  */
9
 
10
  class WppaUploadWidget extends WP_Widget {
@@ -17,12 +17,6 @@ class WppaUploadWidget extends WP_Widget {
17
  function widget( $args, $instance ) {
18
  global $wpdb;
19
 
20
- require_once(dirname(__FILE__) . '/wppa-links.php');
21
- require_once(dirname(__FILE__) . '/wppa-styles.php');
22
- require_once(dirname(__FILE__) . '/wppa-functions.php');
23
- require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
24
- require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
25
- require_once(dirname(__FILE__) . '/wppa-slideshow.php');
26
  wppa_initialize_runtime();
27
 
28
  extract($args);
4
  *
5
  * A wppa widget to upload photos
6
  *
7
+ * Version 6.8.04
8
  */
9
 
10
  class WppaUploadWidget extends WP_Widget {
17
  function widget( $args, $instance ) {
18
  global $wpdb;
19
 
 
 
 
 
 
 
20
  wppa_initialize_runtime();
21
 
22
  extract($args);
wppa-upload.php CHANGED
@@ -133,13 +133,16 @@ global $upload_album;
133
  $max_files = '15';
134
  }
135
  $max_size = ini_get( 'upload_max_filesize' );
 
136
  /* debug */
137
  // $max_size = '2G';
138
  /**/
139
- $max_size_mbytes = substr( $max_size, 0, strlen( $max_size ) - 1 );
140
- if ( substr( $max_size, -1 ) == 'G' ) { // May upload gigabytes!!
141
- $max_size_mbytes *= 1024;
142
  }
 
 
143
  $max_time = ini_get( 'max_input_time' );
144
  if ( $max_time < '1' ) $max_time = __( 'unknown', 'wp-photo-album-plus' );
145
 
@@ -242,7 +245,7 @@ global $upload_album;
242
  'border-color:#e6db55;' .
243
  '"' .
244
  ' >' .
245
- sprintf( __( '<b>Notice:</b> your server allows you to upload <b>%s</b> files of maximum total <b>%s</b> bytes and allows <b>%s</b> seconds to complete.' , 'wp-photo-album-plus' ), $max_files_txt, $max_size, $max_time ) .
246
  ' ' .
247
  __( 'If your request exceeds these limitations, it will fail, probably without an errormessage.' , 'wp-photo-album-plus' ) .
248
  ' ' .
@@ -288,7 +291,7 @@ global $upload_album;
288
  '</div>' .
289
  '<script type="text/javascript">' .
290
  'function showit() {' .
291
- 'var maxsize = parseInt( \'' . $max_size_mbytes . '\' ) * 1024 * 1024;' .
292
  'var maxcount = parseInt( \'' . $max_files_txt . '\' );' .
293
  'var totsize = 0;' .
294
  'var files = document.getElementById( \'my_files\' ).files;' .
@@ -303,9 +306,9 @@ global $upload_album;
303
  'for ( var i=0;i<files.length;i++ ) {' .
304
  'tekst += "<tr>";' .
305
  'tekst += "<td>" + files[i].name + "</td>";' .
306
- 'tekst += "<td>" + files[i].size + "</td>";' .
307
  'totsize += files[i].size;' .
308
- 'tekst += "<td>" + files[i].type + "</td>";' .
309
  'tekst += "</tr>";' .
310
  '}' .
311
  'tekst += "<tr><td><hr /></td><td><hr /></td><td><hr /></td></tr>";' .
133
  $max_files = '15';
134
  }
135
  $max_size = ini_get( 'upload_max_filesize' );
136
+ $max_tot_size = ini_get( 'post_max_size' );
137
  /* debug */
138
  // $max_size = '2G';
139
  /**/
140
+ $max_tot_size_mbytes = substr( $max_tot_size, 0, strlen( $max_tot_size ) - 1 );
141
+ if ( substr( $max_tot_size, -1 ) == 'G' ) { // May upload gigabytes!!
142
+ $max_tot_size_mbytes *= 1024;
143
  }
144
+ $max_size_mbytes = substr( $max_size, 0, strlen( $max_size ) - 1 );
145
+ $max_size_bytes = $max_size_mbytes * 1024 * 1024;
146
  $max_time = ini_get( 'max_input_time' );
147
  if ( $max_time < '1' ) $max_time = __( 'unknown', 'wp-photo-album-plus' );
148
 
245
  'border-color:#e6db55;' .
246
  '"' .
247
  ' >' .
248
+ sprintf( __( '<b>Notice:</b> your server allows you to upload <b>%s</b> files of maximum <b>%s</b> bytes each and total <b>%s</b> bytes and allows <b>%s</b> seconds to complete.' , 'wp-photo-album-plus' ), $max_files_txt, $max_size, $max_tot_size, $max_time ) .
249
  ' ' .
250
  __( 'If your request exceeds these limitations, it will fail, probably without an errormessage.' , 'wp-photo-album-plus' ) .
251
  ' ' .
291
  '</div>' .
292
  '<script type="text/javascript">' .
293
  'function showit() {' .
294
+ 'var maxsize = parseInt( \'' . $max_tot_size_mbytes . '\' ) * 1024 * 1024;' .
295
  'var maxcount = parseInt( \'' . $max_files_txt . '\' );' .
296
  'var totsize = 0;' .
297
  'var files = document.getElementById( \'my_files\' ).files;' .
306
  'for ( var i=0;i<files.length;i++ ) {' .
307
  'tekst += "<tr>";' .
308
  'tekst += "<td>" + files[i].name + "</td>";' .
309
+ 'tekst += "<td id=\'file"+i+"size\' >" + files[i].size + "</td>";' .
310
  'totsize += files[i].size;' .
311
+ 'tekst += "<td>" + ( files[i].size > ' . $max_size_bytes . ' ? "<span style=\'color:red\' >' . __( 'Too big!' , 'wp-photo-album-plus') . '</span>" : files[i].type ) + "</td>";' .
312
  'tekst += "</tr>";' .
313
  '}' .
314
  'tekst += "<tr><td><hr /></td><td><hr /></td><td><hr /></td></tr>";' .
wppa-utils.php CHANGED
@@ -1722,7 +1722,7 @@ global $wppa_log_file;
1722
  }
1723
  if ( $trace ) {
1724
  ob_start();
1725
- debug_print_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 12 );
1726
  $trace = ob_get_contents();
1727
  ob_end_clean();
1728
  @ fwrite( $file, $trace."\n" );
1722
  }
1723
  if ( $trace ) {
1724
  ob_start();
1725
+ debug_print_backtrace( 0, 12 );//DEBUG_BACKTRACE_IGNORE_ARGS, 12 );
1726
  $trace = ob_get_contents();
1727
  ob_end_clean();
1728
  @ fwrite( $file, $trace."\n" );
wppa-wpdb-insert.php CHANGED
@@ -354,6 +354,7 @@ global $wpdb;
354
 
355
  // Update index
356
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
 
357
 
358
  return $args['id'];
359
  }
@@ -449,6 +450,7 @@ global $wpdb;
449
 
450
  // Update index
451
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
 
452
 
453
  return $args['id'];
454
  }
354
 
355
  // Update index
356
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
357
+ wppa_clear_cache();
358
 
359
  return $args['id'];
360
  }
450
 
451
  // Update index
452
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
453
+ wppa_clear_cache();
454
 
455
  return $args['id'];
456
  }
wppa-wpdb-update.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
- * Version 6.6.24
7
  *
8
  */
9
 
@@ -25,6 +25,7 @@ global $wpdb;
25
  if ( ! wppa_cache_album( $args['id'] ) ) return false;
26
  $id = $args['id'];
27
 
 
28
  foreach ( array_keys( $args ) as $itemname ) {
29
  $itemvalue = $args[$itemname];
30
  $doit = false;
@@ -36,11 +37,13 @@ global $wpdb;
36
  case 'name':
37
  $itemvalue = wppa_strip_tags( $itemvalue, 'all' );
38
  $doit = true;
 
39
  break;
40
  case 'description':
41
  $itemvalue = balanceTags( $itemvalue, true );
42
  $itemvalue = wppa_strip_tags( $itemvalue, 'script&style' );
43
  $doit = true;
 
44
  break;
45
  case 'modified':
46
  if ( ! $itemvalue ) {
@@ -51,6 +54,7 @@ global $wpdb;
51
  case 'cats':
52
  $itemvalue = wppa_sanitize_tags( $itemvalue );
53
  $doit = true;
 
54
  break;
55
  case 'scheduledtm':
56
  $doit = true;
@@ -65,6 +69,7 @@ global $wpdb;
65
  break;
66
  case 'custom':
67
  $doit = true;
 
68
  break;
69
 
70
  default:
@@ -80,7 +85,10 @@ global $wpdb;
80
  }
81
 
82
  // Update index
83
- wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
 
 
 
84
 
85
  return true;
86
 
@@ -124,6 +132,7 @@ global $wpdb;
124
  $args['modified'] = time();
125
  }
126
 
 
127
  foreach ( array_keys( $args ) as $itemname ) {
128
  $itemvalue = $args[$itemname];
129
  $doit = false;
@@ -135,11 +144,13 @@ global $wpdb;
135
  case 'name':
136
  $itemvalue = wppa_strip_tags( $itemvalue, 'all' );
137
  $doit = true;
 
138
  break;
139
  case 'description':
140
  $itemvalue = balanceTags( $itemvalue, true );
141
  $itemvalue = wppa_strip_tags( $itemvalue, 'script&style' );
142
  $doit = true;
 
143
  break;
144
  case 'timestamp':
145
  case 'modified':
@@ -160,6 +171,7 @@ global $wpdb;
160
  case 'tags':
161
  $itemvalue = wppa_sanitize_tags( $itemvalue );
162
  $doit = true;
 
163
  break;
164
  case 'thumbx':
165
  case 'thumby':
@@ -176,19 +188,25 @@ global $wpdb;
176
  case 'filename':
177
  $itemvalue = wppa_sanitize_file_name( $itemvalue );
178
  $doit = true;
 
179
  break;
180
- case 'custom':
181
  case 'stereo':
182
  $doit = true;
183
  break;
 
 
 
 
184
  case 'crypt':
185
  $doit = true;
186
  break;
187
  case 'owner':
188
  $doit = true;
 
189
  break;
190
  case 'album':
191
  $doit = true;
 
192
  break;
193
  case 'magickstack':
194
  $doit = true;
@@ -207,7 +225,10 @@ global $wpdb;
207
  }
208
 
209
  // Update index
210
- wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
 
 
 
211
 
212
  return true;
213
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
+ * Version 6.8.04
7
  *
8
  */
9
 
25
  if ( ! wppa_cache_album( $args['id'] ) ) return false;
26
  $id = $args['id'];
27
 
28
+ $need_re_index = false;
29
  foreach ( array_keys( $args ) as $itemname ) {
30
  $itemvalue = $args[$itemname];
31
  $doit = false;
37
  case 'name':
38
  $itemvalue = wppa_strip_tags( $itemvalue, 'all' );
39
  $doit = true;
40
+ $need_re_index = true;
41
  break;
42
  case 'description':
43
  $itemvalue = balanceTags( $itemvalue, true );
44
  $itemvalue = wppa_strip_tags( $itemvalue, 'script&style' );
45
  $doit = true;
46
+ $need_re_index = true;
47
  break;
48
  case 'modified':
49
  if ( ! $itemvalue ) {
54
  case 'cats':
55
  $itemvalue = wppa_sanitize_tags( $itemvalue );
56
  $doit = true;
57
+ $need_re_index = true;
58
  break;
59
  case 'scheduledtm':
60
  $doit = true;
69
  break;
70
  case 'custom':
71
  $doit = true;
72
+ $need_re_index = true;
73
  break;
74
 
75
  default:
85
  }
86
 
87
  // Update index
88
+ if ( $need_re_index ) {
89
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
90
+ wppa_clear_cache();
91
+ }
92
 
93
  return true;
94
 
132
  $args['modified'] = time();
133
  }
134
 
135
+ $need_re_index = false;
136
  foreach ( array_keys( $args ) as $itemname ) {
137
  $itemvalue = $args[$itemname];
138
  $doit = false;
144
  case 'name':
145
  $itemvalue = wppa_strip_tags( $itemvalue, 'all' );
146
  $doit = true;
147
+ $need_re_index = true;
148
  break;
149
  case 'description':
150
  $itemvalue = balanceTags( $itemvalue, true );
151
  $itemvalue = wppa_strip_tags( $itemvalue, 'script&style' );
152
  $doit = true;
153
+ $need_re_index = true;
154
  break;
155
  case 'timestamp':
156
  case 'modified':
171
  case 'tags':
172
  $itemvalue = wppa_sanitize_tags( $itemvalue );
173
  $doit = true;
174
+ $need_re_index = true;
175
  break;
176
  case 'thumbx':
177
  case 'thumby':
188
  case 'filename':
189
  $itemvalue = wppa_sanitize_file_name( $itemvalue );
190
  $doit = true;
191
+ $need_re_index = true;
192
  break;
 
193
  case 'stereo':
194
  $doit = true;
195
  break;
196
+ case 'custom':
197
+ $doit = true;
198
+ $need_re_index = true;
199
+ break;
200
  case 'crypt':
201
  $doit = true;
202
  break;
203
  case 'owner':
204
  $doit = true;
205
+ $need_re_index = true;
206
  break;
207
  case 'album':
208
  $doit = true;
209
+ $need_re_index = true;
210
  break;
211
  case 'magickstack':
212
  $doit = true;
225
  }
226
 
227
  // Update index
228
+ if ( $need_re_index ) {
229
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
230
+ wppa_clear_cache();
231
+ }
232
 
233
  return true;
234
  }
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.8.03
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 = '6803'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-8-03-003'; // 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.8.04
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 = '6804'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-8-04-007'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );