WP Photo Album Plus - Version 6.5.03

Version Description

Download this release

Release Info

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

Code changes from version 6.5.02 to 6.5.03

js/wppa-utils.js CHANGED
@@ -1,27 +1,27 @@
1
  // wppa-utils.js
2
  //
3
  // conatins common vars and functions
4
- //
5
- var wppaJsUtilsVersion = '6.4.19';
6
  var wppaDebug;
7
 
8
- // Trim
9
  // @1 string to be trimmed
10
- // @2 character, string, or array of characters or strings to trim off,
11
  // default: trim spaces, tabs and newlines
12
  function wppaTrim( str, arg ) {
13
 
14
  var result;
15
-
16
  result = wppaTrimLeft( str, arg );
17
  result = wppaTrimRight( result, arg );
18
-
19
  return result;
20
  }
21
 
22
  // Trim left
23
  // @1 string to be trimmed
24
- // @2 character, string, or array of characters or strings to trim off,
25
  // default: trim spaces, tabs and newlines
26
  function wppaTrimLeft( str, arg ) {
27
 
@@ -32,7 +32,7 @@ function wppaTrimLeft( str, arg ) {
32
  var i;
33
  var done;
34
  var oldStr, newStr;
35
-
36
  switch ( typeof ( arg ) ) {
37
  case 'string':
38
  result = str;
@@ -66,7 +66,7 @@ function wppaTrimLeft( str, arg ) {
66
 
67
  // Trim right
68
  // @1 string to be trimmed
69
- // @2 character, string, or array of characters or strings to trim off,
70
  // default: trim spaces, tabs and newlines
71
  function wppaTrimRight( str, arg ) {
72
 
@@ -77,7 +77,7 @@ function wppaTrimRight( str, arg ) {
77
  var i;
78
  var done;
79
  var oldStr, newStr;
80
-
81
  switch ( typeof ( arg ) ) {
82
  case 'string':
83
  result = str;
@@ -105,7 +105,7 @@ function wppaTrimRight( str, arg ) {
105
  default:
106
  return str.replace( /\s\s*$/, '' );
107
  }
108
-
109
  return result;
110
  }
111
 
@@ -147,7 +147,7 @@ function wppaConsoleLog( arg, force ) {
147
 
148
  if ( typeof( console ) != 'undefined' && ( wppaDebug || force == 'force' ) ) {
149
  var d = new Date();
150
- var n = d.getTime();
151
  var t = n % (24*60*60*1000); // msec this day
152
  var h = Math.floor( t / ( 60*60*1000 ) ); // Hours this day
153
  t -= h * 60*60*1000; // msec this hour
@@ -159,5 +159,102 @@ function wppaConsoleLog( arg, force ) {
159
  }
160
  }
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  // Say we're in
163
  wppaConsoleLog( 'wppa-utils.js version '+wppaJsUtilsVersion+' loaded.', 'force' );
1
  // wppa-utils.js
2
  //
3
  // conatins common vars and functions
4
+ //
5
+ var wppaJsUtilsVersion = '6.5.03';
6
  var wppaDebug;
7
 
8
+ // Trim
9
  // @1 string to be trimmed
10
+ // @2 character, string, or array of characters or strings to trim off,
11
  // default: trim spaces, tabs and newlines
12
  function wppaTrim( str, arg ) {
13
 
14
  var result;
15
+
16
  result = wppaTrimLeft( str, arg );
17
  result = wppaTrimRight( result, arg );
18
+
19
  return result;
20
  }
21
 
22
  // Trim left
23
  // @1 string to be trimmed
24
+ // @2 character, string, or array of characters or strings to trim off,
25
  // default: trim spaces, tabs and newlines
26
  function wppaTrimLeft( str, arg ) {
27
 
32
  var i;
33
  var done;
34
  var oldStr, newStr;
35
+
36
  switch ( typeof ( arg ) ) {
37
  case 'string':
38
  result = str;
66
 
67
  // Trim right
68
  // @1 string to be trimmed
69
+ // @2 character, string, or array of characters or strings to trim off,
70
  // default: trim spaces, tabs and newlines
71
  function wppaTrimRight( str, arg ) {
72
 
77
  var i;
78
  var done;
79
  var oldStr, newStr;
80
+
81
  switch ( typeof ( arg ) ) {
82
  case 'string':
83
  result = str;
105
  default:
106
  return str.replace( /\s\s*$/, '' );
107
  }
108
+
109
  return result;
110
  }
111
 
147
 
148
  if ( typeof( console ) != 'undefined' && ( wppaDebug || force == 'force' ) ) {
149
  var d = new Date();
150
+ var n = d.getTime();
151
  var t = n % (24*60*60*1000); // msec this day
152
  var h = Math.floor( t / ( 60*60*1000 ) ); // Hours this day
153
  t -= h * 60*60*1000; // msec this hour
159
  }
160
  }
161
 
162
+ // Conversion utility
163
+ function wppaConvertScriptToShortcode( scriptId, shortcodeId ) {
164
+
165
+ var script;
166
+ var workArr;
167
+ var temp;
168
+ var item;
169
+ var value;
170
+ var type;
171
+ var album;
172
+ var photo;
173
+ var size;
174
+ var align;
175
+ var result;
176
+
177
+ script = jQuery( '#'+scriptId ).val();
178
+ if ( typeof( script ) != 'string' || script.length == 0 ) {
179
+ jQuery( '#'+shortcodeId ).val( 'No script found' );
180
+ jQuery( '#'+shortcodeId ).css( 'color', 'red' );
181
+ return;
182
+ }
183
+
184
+ workarr = script.split( '%%' );
185
+ if ( workarr[1] != 'wppa' || workarr.length < 3 ) {
186
+ jQuery( '#'+shortcodeId ).val( 'No %%wppa%% found' );
187
+ jQuery( '#'+shortcodeId ).css( 'color', 'red' );
188
+ return;
189
+ }
190
+
191
+ for ( i=3;i<workarr.length;i+=2 ) {
192
+ temp = workarr[i].split( '=' );
193
+ item = temp[0];
194
+ value = temp[1];
195
+ if ( item && value ) {
196
+ switch( item ) {
197
+ case 'size':
198
+ size = value;
199
+ break;
200
+ case 'align':
201
+ align = value;
202
+ break;
203
+ case 'photo':
204
+ case 'mphoto':
205
+ case 'slphoto':
206
+ type = item;
207
+ photo = value;
208
+ break;
209
+ case 'album':
210
+ case 'cover':
211
+ case 'slide':
212
+ case 'slideonly':
213
+ case 'slideonlyf':
214
+ case 'slidef':
215
+ type = item;
216
+ album = value;
217
+ break;
218
+ default:
219
+ jQuery( '#'+shortcodeId ).val( 'Token "' + workarr[i] + '" not recognized' );
220
+ jQuery( '#'+shortcodeId ).css( 'color', 'red' );
221
+ return;
222
+
223
+ }
224
+ }
225
+ }
226
+
227
+ result = '[wppa';
228
+
229
+ if ( type && type.length > 0 ) {
230
+ result += ' type="' + type + '"';
231
+ }
232
+
233
+ if ( album && album.length > 0 ) {
234
+ result += ' album="' + album + '"';
235
+ }
236
+
237
+ if ( photo && photo.length > 0 ) {
238
+ result += ' photo="' + photo + '"';
239
+ }
240
+
241
+ if ( size && size.length > 0 ) {
242
+ result += ' size="' + size + '"';
243
+ }
244
+
245
+ if ( align && align.length > 0 ) {
246
+ result += ' align="' + align + '"';
247
+ }
248
+
249
+ result += '][/wppa]';
250
+
251
+ jQuery( '#'+shortcodeId ).val( result );
252
+ jQuery( '#'+shortcodeId ).css( 'color', 'green' );
253
+
254
+ document.getElementById( shortcodeId ).focus();
255
+ document.getElementById( shortcodeId ).select();
256
+
257
+ }
258
+
259
  // Say we're in
260
  wppaConsoleLog( 'wppa-utils.js version '+wppaJsUtilsVersion+' loaded.', 'force' );
js/wppa-utils.min.js CHANGED
@@ -1,9 +1,9 @@
1
  // wppa-utils.js
2
  //
3
  // conatins common vars and functions
4
- //
5
 
6
- var wppaJsUtilsVersion='6.4.19';var wppaDebug;function wppaTrim(str,arg){var result;result=wppaTrimLeft(str,arg);result=wppaTrimRight(result,arg);return result;}
7
  function wppaTrimLeft(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(0,arglen)==arg){result=result.substr(arglen);strlen=result.length;}
8
  break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimLeft(newStr,arg[i]);i++;}
9
  done=(oldStr==newStr);}
@@ -22,4 +22,13 @@ return"";}
22
  function wppaStereoTypeChange(newval){wppa_setCookie('stereotype',newval,365);}
23
  function wppaStereoGlassChange(newval){wppa_setCookie('stereoglass',newval,365);}
24
  function wppaConsoleLog(arg,force){if(typeof(console)!='undefined'&&(wppaDebug||force=='force')){var d=new Date();var n=d.getTime();var t=n%(24*60*60*1000);var h=Math.floor(t/(60*60*1000));t-=h*60*60*1000;var m=Math.floor(t/(60*1000));t-=m*60*1000;var s=Math.floor(t/1000);t-=s*1000;console.log('At: '+h+':'+m+':'+s+'.'+t+' message: '+arg);}}
 
 
 
 
 
 
 
 
 
25
  wppaConsoleLog('wppa-utils.js version '+wppaJsUtilsVersion+' loaded.','force');
1
  // wppa-utils.js
2
  //
3
  // conatins common vars and functions
4
+ //
5
 
6
+ var wppaJsUtilsVersion='6.5.03';var wppaDebug;function wppaTrim(str,arg){var result;result=wppaTrimLeft(str,arg);result=wppaTrimRight(result,arg);return result;}
7
  function wppaTrimLeft(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(0,arglen)==arg){result=result.substr(arglen);strlen=result.length;}
8
  break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimLeft(newStr,arg[i]);i++;}
9
  done=(oldStr==newStr);}
22
  function wppaStereoTypeChange(newval){wppa_setCookie('stereotype',newval,365);}
23
  function wppaStereoGlassChange(newval){wppa_setCookie('stereoglass',newval,365);}
24
  function wppaConsoleLog(arg,force){if(typeof(console)!='undefined'&&(wppaDebug||force=='force')){var d=new Date();var n=d.getTime();var t=n%(24*60*60*1000);var h=Math.floor(t/(60*60*1000));t-=h*60*60*1000;var m=Math.floor(t/(60*1000));t-=m*60*1000;var s=Math.floor(t/1000);t-=s*1000;console.log('At: '+h+':'+m+':'+s+'.'+t+' message: '+arg);}}
25
+ function wppaConvertScriptToShortcode(scriptId,shortcodeId){var script;var workArr;var temp;var item;var value;var type;var album;var photo;var size;var align;var result;script=jQuery('#'+scriptId).val();if(typeof(script)!='string'||script.length==0){jQuery('#'+shortcodeId).val('No script found');jQuery('#'+shortcodeId).css('color','red');return;}
26
+ workarr=script.split('%%');if(workarr[1]!='wppa'||workarr.length<3){jQuery('#'+shortcodeId).val('No %%wppa%% found');jQuery('#'+shortcodeId).css('color','red');return;}
27
+ for(i=3;i<workarr.length;i+=2){temp=workarr[i].split('=');item=temp[0];value=temp[1];if(item&&value){switch(item){case'size':size=value;break;case'align':align=value;break;case'photo':case'mphoto':case'slphoto':type=item;photo=value;break;case'album':case'cover':case'slide':case'slideonly':case'slideonlyf':case'slidef':type=item;album=value;break;default:jQuery('#'+shortcodeId).val('Token "'+workarr[i]+'" not recognized');jQuery('#'+shortcodeId).css('color','red');return;}}}
28
+ result='[wppa';if(type&&type.length>0){result+=' type="'+type+'"';}
29
+ if(album&&album.length>0){result+=' album="'+album+'"';}
30
+ if(photo&&photo.length>0){result+=' photo="'+photo+'"';}
31
+ if(size&&size.length>0){result+=' size="'+size+'"';}
32
+ if(align&&align.length>0){result+=' align="'+align+'"';}
33
+ result+='][/wppa]';jQuery('#'+shortcodeId).val(result);jQuery('#'+shortcodeId).css('color','green');document.getElementById(shortcodeId).focus();document.getElementById(shortcodeId).select();}
34
  wppaConsoleLog('wppa-utils.js version '+wppaJsUtilsVersion+' loaded.','force');
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.4.19';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
@@ -243,6 +243,7 @@ var wppaOvlVideoStart = false;
243
  var wppaOvlAudioStart = false;
244
  var wppaLastIptc = '';
245
  var wppaLastExif = '';
 
246
 
247
  // Init at dom ready
248
  jQuery( document ).ready(function() {
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.5.03';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
243
  var wppaOvlAudioStart = false;
244
  var wppaLastIptc = '';
245
  var wppaLastExif = '';
246
+ var wppaIsMobile = false;
247
 
248
  // Init at dom ready
249
  jQuery( document ).ready(function() {
js/wppa.min.js CHANGED
@@ -3,7 +3,7 @@
3
  // conatins common vars and functions
4
  //
5
 
6
- var wppaJsVersion='6.4.19';var wppaVersion='0';var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaSlower;var wppaFaster;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaStartSymbolUrl='';var wppaPauseSymbolUrl='';var wppaStopSymbolUrl='';var wppaStartPauseSymbolSize='64';var wppaStartPauseSymbolBradius='32';var wppaStopSymbolSize='48';var wppaStopSumbolBradius='24';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var _wppaWaitTexts=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlLeftSymbolUrl;var wppaOvlRightSymbolUrl;var wppaLeftRightSymbolSize=32;var wppaLeftRightSymbolBradius=4;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';jQuery(document).ready(function(){wppaDoInit(false);setTimeout(function(){wppaDoInit(true);},1000);});function wppaDoInit(autoOnly){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
7
  if(!autoOnly){_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}}}
8
  jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
9
  if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
3
  // conatins common vars and functions
4
  //
5
 
6
+ var wppaJsVersion='6.5.03';var wppaVersion='0';var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaSlower;var wppaFaster;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaStartSymbolUrl='';var wppaPauseSymbolUrl='';var wppaStopSymbolUrl='';var wppaStartPauseSymbolSize='64';var wppaStartPauseSymbolBradius='32';var wppaStopSymbolSize='48';var wppaStopSumbolBradius='24';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var _wppaWaitTexts=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlLeftSymbolUrl;var wppaOvlRightSymbolUrl;var wppaLeftRightSymbolSize=32;var wppaLeftRightSymbolBradius=4;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';var wppaIsMobile=false;jQuery(document).ready(function(){wppaDoInit(false);setTimeout(function(){wppaDoInit(true);},1000);});function wppaDoInit(autoOnly){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
7
  if(!autoOnly){_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}}}
8
  jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
9
  if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
5
- Version: 6.5.02
6
- Stable tag: 6.5.01
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -180,6 +180,28 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
180
 
181
  See for additional information: http://www.wppa.nl/changelog/
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = 6.5.02 =
184
 
185
  = Bug Fixes =
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto
5
+ Version: 6.5.03
6
+ Stable tag: 6.5.02
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
180
 
181
  See for additional information: http://www.wppa.nl/changelog/
182
 
183
+ = 6.5.03 =
184
+
185
+ = Bug Fixes =
186
+
187
+ * type="slphoto" did not work. Fixed.
188
+ * type="slidef" added to support the scripting equivalence %%slidef=...%%%
189
+ * photo results in combined wp/wppa search results were not responsive on responsive themes. Fixed.
190
+ * Fixed a missing initialisation that could cause a slideshow not to start in spurious situations.
191
+
192
+ = New Features =
193
+
194
+ * Shortcode type upload can now have attribute parent="album id" as replacement for album="album id".
195
+ This will enable uploads to the album including its (grand) children (only the albums the visitor has the rights to upload to).
196
+ * You can configure more than one grant parent. This causes auto album creation for logged in users in all grant parents.
197
+
198
+ = Other Changes =
199
+
200
+ * Conversion tool inside notification box.
201
+ * Blog shortcode is now configurable in Table II-H18
202
+ * Granted albums are now only created when needed.
203
+ * You can only Blog It! from upload box or widget. No longer from thumb area or cover.
204
+
205
  = 6.5.02 =
206
 
207
  = Bug Fixes =
wppa-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
- * Version 6.5.02
7
  *
8
  */
9
 
@@ -37,12 +37,12 @@ function wppa_add_admin() {
37
  $com_pending = '';
38
  $com_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM `".WPPA_COMMENTS."` WHERE `status` = 'pending'" );
39
  if ( $com_pending_count ) $com_pending = '<span class="update-plugins"><span class="plugin-count">'.$com_pending_count.'</span></span>';
40
-
41
  // See if there are uploads pending moderation
42
  $upl_pending = '';
43
  $upl_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM `".WPPA_PHOTOS."` WHERE `status` = 'pending'" );
44
  if ( $upl_pending_count ) $upl_pending = '<span class="update-plugins"><span class="plugin-count">'.$upl_pending_count.'</span></span>';
45
-
46
  // Compute total pending moderation
47
  $tot_pending = '';
48
  $tot_pending_count = '0';
@@ -98,6 +98,7 @@ global $wppa_api_version;
98
 
99
  // Album admin page
100
  function wppa_admin() {
 
101
  require_once 'wppa-album-admin-autosave.php';
102
  require_once 'wppa-photo-admin-autosave.php';
103
  require_once 'wppa-album-covers.php';
@@ -107,6 +108,7 @@ function wppa_admin() {
107
  // Upload admin page
108
  function wppa_page_upload() {
109
  if ( wppa_is_user_blacklisted() ) wp_die(__( 'Uploading is temporary diabled for you' , 'wp-photo-album-plus') );
 
110
  require_once 'wppa-upload.php';
111
  _wppa_page_upload();
112
  }
@@ -120,6 +122,7 @@ function wppa_edit_photo() {
120
  // Import admin page
121
  function wppa_page_import() {
122
  if ( wppa_is_user_blacklisted() ) wp_die(__( 'Importing is temporary diabled for you' , 'wp-photo-album-plus') );
 
123
  require_once 'wppa-import.php';
124
  echo '<script type="text/javascript">/* <![CDATA[ */wppa_import = "'.__('Import', 'wp-photo-album-plus').'"; wppa_update = "'.__('Update', 'wp-photo-album-plus').'";/* ]]> */</script>';
125
  _wppa_page_import();
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 6.5.03
7
  *
8
  */
9
 
37
  $com_pending = '';
38
  $com_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM `".WPPA_COMMENTS."` WHERE `status` = 'pending'" );
39
  if ( $com_pending_count ) $com_pending = '<span class="update-plugins"><span class="plugin-count">'.$com_pending_count.'</span></span>';
40
+
41
  // See if there are uploads pending moderation
42
  $upl_pending = '';
43
  $upl_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM `".WPPA_PHOTOS."` WHERE `status` = 'pending'" );
44
  if ( $upl_pending_count ) $upl_pending = '<span class="update-plugins"><span class="plugin-count">'.$upl_pending_count.'</span></span>';
45
+
46
  // Compute total pending moderation
47
  $tot_pending = '';
48
  $tot_pending_count = '0';
98
 
99
  // Album admin page
100
  function wppa_admin() {
101
+ wppa_grant_albums();
102
  require_once 'wppa-album-admin-autosave.php';
103
  require_once 'wppa-photo-admin-autosave.php';
104
  require_once 'wppa-album-covers.php';
108
  // Upload admin page
109
  function wppa_page_upload() {
110
  if ( wppa_is_user_blacklisted() ) wp_die(__( 'Uploading is temporary diabled for you' , 'wp-photo-album-plus') );
111
+ wppa_grant_albums();
112
  require_once 'wppa-upload.php';
113
  _wppa_page_upload();
114
  }
122
  // Import admin page
123
  function wppa_page_import() {
124
  if ( wppa_is_user_blacklisted() ) wp_die(__( 'Importing is temporary diabled for you' , 'wp-photo-album-plus') );
125
+ wppa_grant_albums();
126
  require_once 'wppa-import.php';
127
  echo '<script type="text/javascript">/* <![CDATA[ */wppa_import = "'.__('Import', 'wp-photo-album-plus').'"; wppa_update = "'.__('Update', 'wp-photo-album-plus').'";/* ]]> */</script>';
128
  _wppa_page_import();
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.5.00
7
  *
8
  */
9
 
@@ -1584,7 +1584,7 @@ function wppa_upload_box() {
1584
  }
1585
 
1586
  // Have i access?
1587
- if ( $alb ) {
1588
 
1589
  // Access to this album ?
1590
  if ( ! wppa_have_access( $alb ) ) return;
@@ -1781,7 +1781,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
1781
  wppa_nonce_field( 'wppa-album-check' , 'wppa-nonce', false, false, $alb ) .
1782
  '<input type="hidden" name="wppa-album-parent" value="'.$parent.'" />' .
1783
  '<input type="hidden" name="wppa-fe-create" value="yes" />' .
1784
-
1785
  // Name
1786
  '<div'.
1787
  ' class="wppa-box-text wppa-td"' .
@@ -1804,7 +1804,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
1804
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
1805
  ' name="wppa-album-name"' .
1806
  ' />' .
1807
-
1808
  // Description
1809
  '<div' .
1810
  ' class="wppa-box-text wppa-td"' .
@@ -1824,7 +1824,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
1824
  ' style="padding:0;height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
1825
  ' name="wppa-album-desc" >' .
1826
  '</textarea>';
1827
-
1828
  if ( wppa_switch( 'user_create_captcha' ) ) {
1829
  $result .=
1830
  '<div style="float:left; margin: 6px 0;" >' .
@@ -1839,7 +1839,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
1839
  ' />' .
1840
  '</div>';
1841
  }
1842
-
1843
  $result .=
1844
  '<input' .
1845
  ' type="submit"' .
@@ -1859,14 +1859,24 @@ function wppa_user_upload_html( $alb, $width, $where = '', $mcr = false ) {
1859
  wppa_out( wppa_get_user_upload_html( $alb, $width, $where, $mcr ) );
1860
  }
1861
 
1862
- function wppa_get_user_upload_html( $alb, $width, $where = '', $mcr = false ) {
1863
  global $wppa_supported_video_extensions;
1864
  global $wppa_supported_audio_extensions;
1865
  static $seqno;
 
 
 
 
 
 
 
 
1866
 
1867
  // Init
1868
  $mocc = wppa( 'mocc');
1869
  $occur = wppa( 'occur' );
 
 
1870
 
1871
  // Open wrapper
1872
  $result = '<div style="clear:both"></div>';//<div id="fe-upl-wrap-' . $mocc . '" style="background-color:#FFC;" >';
@@ -1884,21 +1894,54 @@ static $seqno;
1884
  if ( ! is_user_logged_in() ) return '';
1885
  }
1886
 
1887
- // I should have access to this album ( $alb > 0 ).
 
 
 
 
 
 
 
1888
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
1889
- $album_owner = wppa_get_album_item( $alb, 'owner' );
1890
- if ( $album_owner != wppa_get_user() && $album_owner != '--- public ---' && ! wppa_have_access( $alb ) ) {
1891
  return '';
1892
  }
1893
  }
1894
 
1895
- // Any album available for upload? ( $alb = 0 )
1896
- else {
1897
- if ( ! wppa_have_access() ) {
1898
- return '';
 
 
 
 
 
 
 
 
 
 
 
1899
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1900
  }
1901
 
 
 
1902
  // Find max files for the user
1903
  $allow_me = wppa_allow_user_uploads();
1904
  if ( ! $allow_me ) {
@@ -1913,16 +1956,21 @@ static $seqno;
1913
  }
1914
 
1915
  // Find max files for the album
1916
- $allow_alb = wppa_allow_uploads( $alb );
1917
- if ( ! $allow_alb ) {
1918
- if ( wppa_switch( 'show_album_full' ) ) {
1919
- $result .=
1920
- '<h6 style="color:red">' .
1921
- __( 'Max uploads reached', 'wp-photo-album-plus' ) .
1922
- wppa_time_to_wait_html( $alb ) .
1923
- '</h6>';
 
 
 
1924
  }
1925
- return $result;
 
 
1926
  }
1927
 
1928
  if ( wppa_is_user_blacklisted() ) return '';
@@ -1966,15 +2014,15 @@ static $seqno;
1966
  $t = $mcr ? 'mcr-' : '';
1967
  $result .=
1968
  '<a' .
1969
- ' id="wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
1970
  ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
1971
  ' onclick="' .
1972
- 'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Upload form
1973
- 'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload link
1974
- 'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create link
1975
- 'jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Edit link
1976
- 'jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . $mocc . '\' ).css( \'display\',\'none\' );'. // Hide catogory
1977
- 'jQuery( \'#_wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show backlink
1978
  '_wppaDoAutocol( ' . $mocc . ' )' . // Trigger autocol
1979
  '"' .
1980
  ' style="float:left; cursor:pointer;' .
@@ -1982,15 +2030,15 @@ static $seqno;
1982
  __( 'Upload Photo', 'wp-photo-album-plus' ) .
1983
  '</a>' .
1984
  '<a' .
1985
- ' id="_wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'"' .
1986
  ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
1987
  ' onclick="' .
1988
- 'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload form
1989
- 'jQuery( \'#wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
1990
- 'jQuery( \'#wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Upload link
1991
- 'jQuery( \'#wppa-ea-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Edit link
1992
- 'jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . $mocc . '\' ).css( \'display\',\'block\' );'. // Show catogory
1993
- 'jQuery( \'#_wppa-up-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
1994
  '_wppaDoAutocol( ' . $mocc . ' )' . // Trigger autocol
1995
  '"' .
1996
  ' style="float:right; cursor:pointer;display:none;' .
@@ -1998,20 +2046,20 @@ static $seqno;
1998
  __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
1999
  '</a>' .
2000
  '<div' .
2001
- ' id="wppa-file-'.$t.str_replace('.','-',$alb).'-'.$mocc.'"' .
2002
  ' class=""' .
2003
  ' style="width:100%;text-align:center;display:none; clear:both;"' .
2004
  ' >' .
2005
  '<form' .
2006
- ' id="wppa-uplform-'.$alb.'-'.$mocc.'"' .
2007
  ' action="'.$returnurl.'"' .
2008
  ' method="post"' .
2009
  ' enctype="multipart/form-data"' .
2010
  ' >' .
2011
- wppa_nonce_field( 'wppa-check' , 'wppa-nonce', false, false, $alb );
2012
 
2013
  // Single Album given
2014
- if ( wppa_is_int( $alb ) && $alb > '0' ) {
2015
  $result .=
2016
  '<input' .
2017
  ' type="hidden"' .
@@ -2021,22 +2069,21 @@ static $seqno;
2021
  ' />';
2022
  }
2023
 
2024
- // If no album given: select one
2025
  else {
2026
- $albarr = explode( '.', wppa_expand_enum( $alb ) );
2027
  $result .=
2028
  '<select' .
2029
  ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
2030
  ' name="wppa-upload-album"' .
2031
  ' style="float:left; max-width: 100%;"' .
2032
- ' onchange="jQuery( \'#wppa-sel-'.$alb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
2033
  ' >' .
2034
  wppa_album_select_a( array ( 'addpleaseselect' => true,
2035
  'checkowner' => true,
2036
  'checkupload' => true,
2037
  'path' => wppa_switch( 'hier_albsel' ),
2038
- 'checkarray' => count( $albarr ) > 1,
2039
- 'array' => $albarr,
2040
  ) ) .
2041
  '</select>' .
2042
  '<br />';
@@ -2104,11 +2151,11 @@ static $seqno;
2104
  ' style="' .
2105
  'display:none;' .
2106
  '"' .
2107
- ' id="wppa-user-upload-' . $alb . '-' . $mocc . '"' .
2108
- ' name="wppa-user-upload-' . $alb . '-' . $mocc . '[]"' .
2109
  ' onchange="' .
2110
- 'jQuery( \'#wppa-user-submit-' . $alb . '-' . $mocc.'\' ).css( \'display\', \'block\' );' .
2111
- 'wppaDisplaySelectedFiles(\'wppa-user-upload-' . $alb . '-' . $mocc . '\')' .
2112
  '"' .
2113
  ' />' .
2114
 
@@ -2116,9 +2163,9 @@ static $seqno;
2116
  '<input' .
2117
  ' type="button"' .
2118
  ' style="width:100%;margin-top:8px;margin-bottom:8px;padding-left:0;padding-right:0;"' .
2119
- ' id="wppa-user-upload-' . $alb . '-' . $mocc . '-display"' .
2120
  ' value="' . $value . '"' .
2121
- ' onclick="jQuery( \'#wppa-user-upload-' . $alb . '-' . $mocc . '\' ).click();"' .
2122
  '/>';
2123
 
2124
  // Explanation
@@ -2290,7 +2337,7 @@ static $seqno;
2290
  if ( wppa_switch( 'fe_upload_tags' ) ) {
2291
 
2292
  // Prepare onclick action
2293
- $onc = 'wppaPrevTags(\'wppa-sel-'.$alb.'-'.$mocc.'\', \'wppa-inp-'.$alb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$alb.'-'.$mocc.'\')';
2294
 
2295
  // Open the tag enter area
2296
  $result .= '<div style="clear:both;" >';
@@ -2303,7 +2350,7 @@ static $seqno;
2303
  __( wppa_opt( 'up_tagselbox_title_'.$i ) ,'wp-photo-album-plus' ) .
2304
  '</h6>' .
2305
  '<select' .
2306
- ' id="wppa-sel-'.$alb.'-'.$mocc.'-'.$i.'"' .
2307
  ' name="wppa-user-tags-'.$i.'[]"' .
2308
  ( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) .
2309
  ' onchange="'.$onc.'"' .
@@ -2312,14 +2359,14 @@ static $seqno;
2312
  $tags = explode( ',', wppa_opt( 'up_tagselbox_content_'.$i ) );
2313
  $result .= '<option value="" >&nbsp;</option>';
2314
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2315
- $result .= '<option class="wppa-sel-'.$alb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
2316
  }
2317
  }
2318
  else { // All existing tags
2319
  $tags = wppa_get_taglist();
2320
  $result .= '<option value="" >&nbsp;</option>';
2321
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2322
- $result .= '<option class="wppa-sel-'.$alb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
2323
  }
2324
  }
2325
  $result .= '</select><div style="clear:both;" ></div>';
@@ -2332,7 +2379,7 @@ static $seqno;
2332
  __( wppa_opt( 'up_tag_input_title' ), 'wp-photo-album-plus' ) .
2333
  '</h6>' .
2334
  '<input' .
2335
- ' id="wppa-inp-'.$alb.'-'.$mocc.'"' .
2336
  ' type="text"' .
2337
  ' class="wppa-box-text "' .
2338
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
@@ -2345,7 +2392,7 @@ static $seqno;
2345
  if ( wppa_switch( 'up_tag_preview' ) ) {
2346
  $result .= '<h6>' .
2347
  __( 'Preview tags:', 'wp-photo-album-plus' ) .
2348
- ' <small id="wppa-prev-'.$alb.'-'.$mocc.'"></small>' .
2349
  '</h6>' .
2350
  '<script type="text/javascript" >jQuery( document ).ready(function() {'.$onc.'})</script>';
2351
  }
@@ -2353,35 +2400,35 @@ static $seqno;
2353
  // Close tag enter area
2354
  $result .= '</div>';
2355
  }
2356
-
2357
  /* The Blogit section */
2358
 
2359
- if ( current_user_can( 'edit_posts' ) && wppa_switch( 'blog_it' ) ) {
2360
- $result .=
2361
  '<div>' .
2362
  '<h6>' .
2363
- __( 'Blog it?', 'wp-photo-album-plus' ) .
2364
  ' <input' .
2365
  ' type="checkbox"' .
2366
- ' id="wppa-blogit-'.$alb.'-'.$mocc.'"' .
2367
  ' name="wppa-blogit"' .
2368
  ' onchange="if ( jQuery(this).attr(\'checked\') ) { ' .
2369
- 'jQuery(\'#blog-div-'.$alb.'-'.$mocc.'\').css(\'display\',\'block\'); ' .
2370
  '} ' .
2371
  'else { ' .
2372
- 'jQuery(\'#blog-div-'.$alb.'-'.$mocc.'\').css(\'display\',\'none\'); ' .
2373
  '} "' .
2374
  ' />' .
2375
  '</h6>' .
2376
  '<div' .
2377
- ' id="blog-div-'.$alb.'-'.$mocc.'"' .
2378
  ' style="display:none;"' .
2379
  ' />' .
2380
  '<h6>' .
2381
  __( 'Post title:', 'wp-photo-album-plus' ) .
2382
  '</h6>' .
2383
  '<input' .
2384
- ' id="wppa-blogit-title-'.$alb.'-'.$mocc.'"' .
2385
  ' type="text"' .
2386
  ' class="wppa-box-text "' .
2387
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
@@ -2391,7 +2438,7 @@ static $seqno;
2391
  __( 'Text BEFORE the image:', 'wp-photo-album-plus' ) .
2392
  '</h6>' .
2393
  '<textarea' .
2394
- ' id="wppa-blogit-pretext-'.$alb.'-'.$mocc.'"' .
2395
  ' name="wppa-blogit-pretext"' .
2396
  ' class=wppa-user-textarea wppa-box-text"' .
2397
  ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
@@ -2401,7 +2448,7 @@ static $seqno;
2401
  __( 'Text AFTER the image:', 'wp-photo-album-plus' ) .
2402
  '</h6>' .
2403
  '<textarea' .
2404
- ' id="wppa-blogit-posttext-'.$alb.'-'.$mocc.'"' .
2405
  ' name="wppa-blogit-posttext"' .
2406
  ' class=wppa-user-textarea wppa-box-text"' .
2407
  ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
@@ -2429,11 +2476,11 @@ static $seqno;
2429
  '<div style="height:6px;;clear:both;" ></div>' .
2430
  '<input' .
2431
  ' type="submit"' .
2432
- ' id="wppa-user-submit-' . $alb . '-' . $mocc . '"' .
2433
  $onclick .
2434
  ' style="display:none; margin: 6px 0; float:right;"' .
2435
  ' class="wppa-user-submit"' .
2436
- ' name="wppa-user-submit-'.$alb.'-'.$mocc.'" value="'.__( 'Upload photo', 'wp-photo-album-plus' ).'"' .
2437
  ' />' .
2438
  '<div style="height:6px;clear:both;"></div>';
2439
 
@@ -2441,14 +2488,14 @@ static $seqno;
2441
  if ( $ajax_upload ) {
2442
  $result .=
2443
  '<div' .
2444
- ' id="progress-'.$alb.'-'.$mocc.'"' .
2445
  ' class="wppa-progress "' .
2446
  ' style="width:100%;border-color:'.wppa_opt( 'bcolor_upload' ).'"' .
2447
  ' >' .
2448
- '<div id="bar-'.$alb.'-'.$mocc.'" class="wppa-bar" ></div>' .
2449
- '<div id="percent-'.$alb.'-'.$mocc.'" class="wppa-percent" >0%</div >' .
2450
  '</div>' .
2451
- '<div id="message-'.$alb.'-'.$mocc.'" class="wppa-message" ></div>';
2452
  }
2453
 
2454
  /* End submit section */
@@ -2465,35 +2512,35 @@ static $seqno;
2465
 
2466
  var options = {
2467
  beforeSend: function() {
2468
- jQuery("#progress-'.$alb.'-'.$mocc.'").show();
2469
  //clear everything
2470
- jQuery("#bar-'.$alb.'-'.$mocc.'").width(\'0%\');
2471
- jQuery("#message-'.$alb.'-'.$mocc.'").html("");
2472
- jQuery("#percent-'.$alb.'-'.$mocc.'").html("");
2473
  },
2474
  uploadProgress: function(event, position, total, percentComplete) {
2475
- jQuery("#bar-'.$alb.'-'.$mocc.'").width(percentComplete+\'%\');
2476
  if ( percentComplete < 95 ) {
2477
- jQuery("#percent-'.$alb.'-'.$mocc.'").html(percentComplete+\'%\');
2478
  }
2479
  else {
2480
- jQuery("#percent-'.$alb.'-'.$mocc.'").html(\'Processing...\');
2481
  }
2482
  },
2483
  success: function() {
2484
- jQuery("#bar-'.$alb.'-'.$mocc.'").width(\'100%\');
2485
- jQuery("#percent-'.$alb.'-'.$mocc.'").html(\'Done!\');
2486
  },
2487
  complete: function(response) {
2488
- jQuery("#message-'.$alb.'-'.$mocc.'").html( \'<span style="font-size: 10px;" >\'+response.responseText+\'</span>\' );'.
2489
  ( $where == 'thumb' ? 'document.location.reload(true)' : '' ).'
2490
  },
2491
  error: function() {
2492
- jQuery("#message-'.$alb.'-'.$mocc.'").html( \'<span style="color: red;" >'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'</span>\' );
2493
  }
2494
  };
2495
 
2496
- jQuery("#wppa-uplform-'.$alb.'-'.$mocc.'").ajaxForm(options);
2497
  });
2498
  </script>';
2499
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.5.03
7
  *
8
  */
9
 
1584
  }
1585
 
1586
  // Have i access?
1587
+ if ( $alb && ! wppa_is_enum( $alb ) ) {
1588
 
1589
  // Access to this album ?
1590
  if ( ! wppa_have_access( $alb ) ) return;
1781
  wppa_nonce_field( 'wppa-album-check' , 'wppa-nonce', false, false, $alb ) .
1782
  '<input type="hidden" name="wppa-album-parent" value="'.$parent.'" />' .
1783
  '<input type="hidden" name="wppa-fe-create" value="yes" />' .
1784
+
1785
  // Name
1786
  '<div'.
1787
  ' class="wppa-box-text wppa-td"' .
1804
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
1805
  ' name="wppa-album-name"' .
1806
  ' />' .
1807
+
1808
  // Description
1809
  '<div' .
1810
  ' class="wppa-box-text wppa-td"' .
1824
  ' style="padding:0;height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
1825
  ' name="wppa-album-desc" >' .
1826
  '</textarea>';
1827
+
1828
  if ( wppa_switch( 'user_create_captcha' ) ) {
1829
  $result .=
1830
  '<div style="float:left; margin: 6px 0;" >' .
1839
  ' />' .
1840
  '</div>';
1841
  }
1842
+
1843
  $result .=
1844
  '<input' .
1845
  ' type="submit"' .
1859
  wppa_out( wppa_get_user_upload_html( $alb, $width, $where, $mcr ) );
1860
  }
1861
 
1862
+ function wppa_get_user_upload_html( $xalb, $width, $where = '', $mcr = false ) {
1863
  global $wppa_supported_video_extensions;
1864
  global $wppa_supported_audio_extensions;
1865
  static $seqno;
1866
+ static $albums_granted;
1867
+
1868
+ // Create granted albums if needed
1869
+ $xparent = wppa_is_int( $xalb ) ? $xalb : '0';
1870
+ if ( ! $albums_granted || ! in_array( $xalb, $albums_granted, true ) ) {
1871
+ wppa_grant_albums( $xparent );
1872
+ $albums_granted[] = $xparent;
1873
+ }
1874
 
1875
  // Init
1876
  $mocc = wppa( 'mocc');
1877
  $occur = wppa( 'occur' );
1878
+ $alb = $xalb;
1879
+ $yalb = str_replace( '.', '', $xalb );
1880
 
1881
  // Open wrapper
1882
  $result = '<div style="clear:both"></div>';//<div id="fe-upl-wrap-' . $mocc . '" style="background-color:#FFC;" >';
1894
  if ( ! is_user_logged_in() ) return '';
1895
  }
1896
 
1897
+ // Basically there are 3 possibilities for supplied album id(s)
1898
+ // 1. A single album
1899
+ // 2. '' or '0', meaning 'any'
1900
+ // 3. An album enumerations
1901
+ //
1902
+ // Now we are going to test if the visitor has access
1903
+
1904
+ // Case 1. A single album. I should have access to this album ( $alb > 0 ).
1905
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
1906
+ if ( ! wppa_have_access( $alb ) ) {
 
1907
  return '';
1908
  }
1909
  }
1910
 
1911
+ // Case 2. No alb given, treat as all albums. Make enumeration of all albums and process as enumeration.
1912
+ elseif ( ! $alb ) {
1913
+ $alb = trim( wppa_alb_to_enum_children( '0' ) . '.' . wppa_alb_to_enum_children( '-1' ), '.' );
1914
+ }
1915
+
1916
+ // Case 3. An enumeration. Test for all albums in the enumeration, and remove the albums that he has no access to.
1917
+ // In this event, if a single album remains, there will not be a selectionbox, but its treated as if a single album was supplied.
1918
+ if ( wppa_is_enum( $alb ) ) {
1919
+
1920
+ $albarr = explode( '.', wppa_expand_enum( $alb ) );
1921
+
1922
+ foreach( array_keys( $albarr ) as $key ) {
1923
+ if ( ! wppa_have_access( $albarr[$key] ) ) {
1924
+ unset( $albarr[$key] );
1925
+ }
1926
  }
1927
+ if ( empty( $albarr ) ) {
1928
+ $alb = '';
1929
+ }
1930
+ if ( count( $albarr ) == 1 ) {
1931
+ $alb = reset( $albarr );
1932
+ }
1933
+ else {
1934
+ $alb = $albarr;
1935
+ }
1936
+ }
1937
+
1938
+ // If no more albums left, no access, quit this proc.
1939
+ if ( ! $alb ) {
1940
+ return '';
1941
  }
1942
 
1943
+ // The result is: $alb is either an album id, or an array of album ids. Always with upload access.
1944
+
1945
  // Find max files for the user
1946
  $allow_me = wppa_allow_user_uploads();
1947
  if ( ! $allow_me ) {
1956
  }
1957
 
1958
  // Find max files for the album
1959
+ if ( wppa_is_int( $alb ) ) {
1960
+ $allow_alb = wppa_allow_uploads( $alb );
1961
+ if ( ! $allow_alb ) {
1962
+ if ( wppa_switch( 'show_album_full' ) ) {
1963
+ $result .=
1964
+ '<h6 style="color:red">' .
1965
+ __( 'Max uploads reached', 'wp-photo-album-plus' ) .
1966
+ wppa_time_to_wait_html( $alb ) .
1967
+ '</h6>';
1968
+ }
1969
+ return $result;
1970
  }
1971
+ }
1972
+ else {
1973
+ $allow_alb = '-1';
1974
  }
1975
 
1976
  if ( wppa_is_user_blacklisted() ) return '';
2014
  $t = $mcr ? 'mcr-' : '';
2015
  $result .=
2016
  '<a' .
2017
+ ' id="wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'"' .
2018
  ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
2019
  ' onclick="' .
2020
+ 'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Open the Upload form
2021
+ 'jQuery( \'#wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload link
2022
+ 'jQuery( \'#wppa-cr-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Create link
2023
+ 'jQuery( \'#wppa-ea-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Edit link
2024
+ 'jQuery( \'#wppa-cats-' . str_replace('.','-',$yalb) . '-' . $mocc . '\' ).css( \'display\',\'none\' );'. // Hide catogory
2025
+ 'jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show backlink
2026
  '_wppaDoAutocol( ' . $mocc . ' )' . // Trigger autocol
2027
  '"' .
2028
  ' style="float:left; cursor:pointer;' .
2030
  __( 'Upload Photo', 'wp-photo-album-plus' ) .
2031
  '</a>' .
2032
  '<a' .
2033
+ ' id="_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'"' .
2034
  ' class="wppa-upload-'.$where.' wppa-album-cover-link"' .
2035
  ' onclick="' .
2036
+ 'jQuery( \'#wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide the Upload form
2037
+ 'jQuery( \'#wppa-cr-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Create link
2038
+ 'jQuery( \'#wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Upload link
2039
+ 'jQuery( \'#wppa-ea-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show the Edit link
2040
+ 'jQuery( \'#wppa-cats-' . str_replace('.','-',$yalb) . '-' . $mocc . '\' ).css( \'display\',\'block\' );'. // Show catogory
2041
+ 'jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
2042
  '_wppaDoAutocol( ' . $mocc . ' )' . // Trigger autocol
2043
  '"' .
2044
  ' style="float:right; cursor:pointer;display:none;' .
2046
  __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
2047
  '</a>' .
2048
  '<div' .
2049
+ ' id="wppa-file-'.$t.str_replace('.','-',$yalb).'-'.$mocc.'"' .
2050
  ' class=""' .
2051
  ' style="width:100%;text-align:center;display:none; clear:both;"' .
2052
  ' >' .
2053
  '<form' .
2054
+ ' id="wppa-uplform-'.$yalb.'-'.$mocc.'"' .
2055
  ' action="'.$returnurl.'"' .
2056
  ' method="post"' .
2057
  ' enctype="multipart/form-data"' .
2058
  ' >' .
2059
+ wppa_nonce_field( 'wppa-check' , 'wppa-nonce', false, false, $yalb );
2060
 
2061
  // Single Album given
2062
+ if ( wppa_is_int( $alb ) ) {
2063
  $result .=
2064
  '<input' .
2065
  ' type="hidden"' .
2069
  ' />';
2070
  }
2071
 
2072
+ // Array given
2073
  else {
 
2074
  $result .=
2075
  '<select' .
2076
  ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
2077
  ' name="wppa-upload-album"' .
2078
  ' style="float:left; max-width: 100%;"' .
2079
+ ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
2080
  ' >' .
2081
  wppa_album_select_a( array ( 'addpleaseselect' => true,
2082
  'checkowner' => true,
2083
  'checkupload' => true,
2084
  'path' => wppa_switch( 'hier_albsel' ),
2085
+ 'checkarray' => count( $alb ) > 1,
2086
+ 'array' => $alb,
2087
  ) ) .
2088
  '</select>' .
2089
  '<br />';
2151
  ' style="' .
2152
  'display:none;' .
2153
  '"' .
2154
+ ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '"' .
2155
+ ' name="wppa-user-upload-' . $yalb . '-' . $mocc . '[]"' .
2156
  ' onchange="' .
2157
+ 'jQuery( \'#wppa-user-submit-' . $yalb . '-' . $mocc.'\' ).css( \'display\', \'block\' );' .
2158
+ 'wppaDisplaySelectedFiles(\'wppa-user-upload-' . $yalb . '-' . $mocc . '\')' .
2159
  '"' .
2160
  ' />' .
2161
 
2163
  '<input' .
2164
  ' type="button"' .
2165
  ' style="width:100%;margin-top:8px;margin-bottom:8px;padding-left:0;padding-right:0;"' .
2166
+ ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '-display"' .
2167
  ' value="' . $value . '"' .
2168
+ ' onclick="jQuery( \'#wppa-user-upload-' . $yalb . '-' . $mocc . '\' ).click();"' .
2169
  '/>';
2170
 
2171
  // Explanation
2337
  if ( wppa_switch( 'fe_upload_tags' ) ) {
2338
 
2339
  // Prepare onclick action
2340
+ $onc = 'wppaPrevTags(\'wppa-sel-'.$yalb.'-'.$mocc.'\', \'wppa-inp-'.$yalb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$yalb.'-'.$mocc.'\')';
2341
 
2342
  // Open the tag enter area
2343
  $result .= '<div style="clear:both;" >';
2350
  __( wppa_opt( 'up_tagselbox_title_'.$i ) ,'wp-photo-album-plus' ) .
2351
  '</h6>' .
2352
  '<select' .
2353
+ ' id="wppa-sel-'.$yalb.'-'.$mocc.'-'.$i.'"' .
2354
  ' name="wppa-user-tags-'.$i.'[]"' .
2355
  ( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) .
2356
  ' onchange="'.$onc.'"' .
2359
  $tags = explode( ',', wppa_opt( 'up_tagselbox_content_'.$i ) );
2360
  $result .= '<option value="" >&nbsp;</option>';
2361
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2362
+ $result .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
2363
  }
2364
  }
2365
  else { // All existing tags
2366
  $tags = wppa_get_taglist();
2367
  $result .= '<option value="" >&nbsp;</option>';
2368
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2369
+ $result .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
2370
  }
2371
  }
2372
  $result .= '</select><div style="clear:both;" ></div>';
2379
  __( wppa_opt( 'up_tag_input_title' ), 'wp-photo-album-plus' ) .
2380
  '</h6>' .
2381
  '<input' .
2382
+ ' id="wppa-inp-'.$yalb.'-'.$mocc.'"' .
2383
  ' type="text"' .
2384
  ' class="wppa-box-text "' .
2385
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
2392
  if ( wppa_switch( 'up_tag_preview' ) ) {
2393
  $result .= '<h6>' .
2394
  __( 'Preview tags:', 'wp-photo-album-plus' ) .
2395
+ ' <small id="wppa-prev-'.$yalb.'-'.$mocc.'"></small>' .
2396
  '</h6>' .
2397
  '<script type="text/javascript" >jQuery( document ).ready(function() {'.$onc.'})</script>';
2398
  }
2400
  // Close tag enter area
2401
  $result .= '</div>';
2402
  }
2403
+
2404
  /* The Blogit section */
2405
 
2406
+ if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_switch( 'blog_it' ) ) {
2407
+ $result .=
2408
  '<div>' .
2409
  '<h6>' .
2410
+ __( 'Blog it?', 'wp-photo-album-plus' ) .
2411
  ' <input' .
2412
  ' type="checkbox"' .
2413
+ ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
2414
  ' name="wppa-blogit"' .
2415
  ' onchange="if ( jQuery(this).attr(\'checked\') ) { ' .
2416
+ 'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'block\'); ' .
2417
  '} ' .
2418
  'else { ' .
2419
+ 'jQuery(\'#blog-div-'.$yalb.'-'.$mocc.'\').css(\'display\',\'none\'); ' .
2420
  '} "' .
2421
  ' />' .
2422
  '</h6>' .
2423
  '<div' .
2424
+ ' id="blog-div-'.$yalb.'-'.$mocc.'"' .
2425
  ' style="display:none;"' .
2426
  ' />' .
2427
  '<h6>' .
2428
  __( 'Post title:', 'wp-photo-album-plus' ) .
2429
  '</h6>' .
2430
  '<input' .
2431
+ ' id="wppa-blogit-title-'.$yalb.'-'.$mocc.'"' .
2432
  ' type="text"' .
2433
  ' class="wppa-box-text "' .
2434
  ' style="padding:0; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
2438
  __( 'Text BEFORE the image:', 'wp-photo-album-plus' ) .
2439
  '</h6>' .
2440
  '<textarea' .
2441
+ ' id="wppa-blogit-pretext-'.$yalb.'-'.$mocc.'"' .
2442
  ' name="wppa-blogit-pretext"' .
2443
  ' class=wppa-user-textarea wppa-box-text"' .
2444
  ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
2448
  __( 'Text AFTER the image:', 'wp-photo-album-plus' ) .
2449
  '</h6>' .
2450
  '<textarea' .
2451
+ ' id="wppa-blogit-posttext-'.$yalb.'-'.$mocc.'"' .
2452
  ' name="wppa-blogit-posttext"' .
2453
  ' class=wppa-user-textarea wppa-box-text"' .
2454
  ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.__wcs( 'wppa-box-text' ).'"' .
2476
  '<div style="height:6px;;clear:both;" ></div>' .
2477
  '<input' .
2478
  ' type="submit"' .
2479
+ ' id="wppa-user-submit-' . $yalb . '-' . $mocc . '"' .
2480
  $onclick .
2481
  ' style="display:none; margin: 6px 0; float:right;"' .
2482
  ' class="wppa-user-submit"' .
2483
+ ' name="wppa-user-submit-'.$yalb.'-'.$mocc.'" value="'.__( 'Upload photo', 'wp-photo-album-plus' ).'"' .
2484
  ' />' .
2485
  '<div style="height:6px;clear:both;"></div>';
2486
 
2488
  if ( $ajax_upload ) {
2489
  $result .=
2490
  '<div' .
2491
+ ' id="progress-'.$yalb.'-'.$mocc.'"' .
2492
  ' class="wppa-progress "' .
2493
  ' style="width:100%;border-color:'.wppa_opt( 'bcolor_upload' ).'"' .
2494
  ' >' .
2495
+ '<div id="bar-'.$yalb.'-'.$mocc.'" class="wppa-bar" ></div>' .
2496
+ '<div id="percent-'.$yalb.'-'.$mocc.'" class="wppa-percent" >0%</div >' .
2497
  '</div>' .
2498
+ '<div id="message-'.$yalb.'-'.$mocc.'" class="wppa-message" ></div>';
2499
  }
2500
 
2501
  /* End submit section */
2512
 
2513
  var options = {
2514
  beforeSend: function() {
2515
+ jQuery("#progress-'.$yalb.'-'.$mocc.'").show();
2516
  //clear everything
2517
+ jQuery("#bar-'.$yalb.'-'.$mocc.'").width(\'0%\');
2518
+ jQuery("#message-'.$yalb.'-'.$mocc.'").html("");
2519
+ jQuery("#percent-'.$yalb.'-'.$mocc.'").html("");
2520
  },
2521
  uploadProgress: function(event, position, total, percentComplete) {
2522
+ jQuery("#bar-'.$yalb.'-'.$mocc.'").width(percentComplete+\'%\');
2523
  if ( percentComplete < 95 ) {
2524
+ jQuery("#percent-'.$yalb.'-'.$mocc.'").html(percentComplete+\'%\');
2525
  }
2526
  else {
2527
+ jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\'Processing...\');
2528
  }
2529
  },
2530
  success: function() {
2531
+ jQuery("#bar-'.$yalb.'-'.$mocc.'").width(\'100%\');
2532
+ jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\'Done!\');
2533
  },
2534
  complete: function(response) {
2535
+ jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="font-size: 10px;" >\'+response.responseText+\'</span>\' );'.
2536
  ( $where == 'thumb' ? 'document.location.reload(true)' : '' ).'
2537
  },
2538
  error: function() {
2539
+ jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="color: red;" >'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'</span>\' );
2540
  }
2541
  };
2542
 
2543
+ jQuery("#wppa-uplform-'.$yalb.'-'.$mocc.'").ajaxForm(options);
2544
  });
2545
  </script>';
2546
  }
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 6.5.02
6
  *
7
  */
8
 
@@ -99,29 +99,6 @@ global $wppa_defaults;
99
  if ( $iret ) wppa_update_option( 'wppa_spam_auto_delcount', get_option( 'wppa_spam_auto_delcount', '0' ) + $iret );
100
  }
101
 
102
- // Create an album if required
103
- if ( wppa_switch( 'grant_an_album' )
104
- && wppa_switch( 'owner_only' )
105
- && is_user_logged_in()
106
- && ( current_user_can( 'wppa_upload' ) || wppa_switch( 'user_upload_on' ) ) ) {
107
- $owner = wppa_get_user( 'login' );
108
- $user = wppa_get_user( wppa_opt( 'grant_name' ) );
109
- $albs = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `".WPPA_ALBUMS."` WHERE `owner` = %s", $owner ) );
110
- if ( ! $albs ) { // make an album for this user
111
- $name = $user;
112
- if ( is_admin() ) {
113
- $desc = __( 'Default photo album for' , 'wp-photo-album-plus').' '.$user;
114
- }
115
- else {
116
- $desc = __( 'Default photo album for' , 'wp-photo-album-plus').' '.$user;
117
- }
118
- $parent = wppa_opt( 'grant_parent' );
119
- $id = wppa_create_album_entry( array ( 'name' => $name, 'description' => $desc, 'a_parent' => $parent ) );
120
- wppa_flush_treecounts( $parent );
121
- wppa_index_add( 'album', $id );
122
- }
123
- }
124
-
125
  $wppa_initruntimetime += microtime( true );
126
  }
127
 
@@ -740,7 +717,7 @@ global $current_user;
740
 
741
  // -- public --- ?
742
  if ( $owner == '--- public ---' ) return true;
743
- if ( wppa_is_int( str_replace( '.', '', $owner ) ) ) return true;
744
 
745
  // Find the user
746
  if ( is_user_logged_in() ) {
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 6.5.03
6
  *
7
  */
8
 
99
  if ( $iret ) wppa_update_option( 'wppa_spam_auto_delcount', get_option( 'wppa_spam_auto_delcount', '0' ) + $iret );
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  $wppa_initruntimetime += microtime( true );
103
  }
104
 
717
 
718
  // -- public --- ?
719
  if ( $owner == '--- public ---' ) return true;
720
+ if ( wppa_is_int( str_replace( '.', '', $owner ) ) ) return true; // Owner is an ip
721
 
722
  // Find the user
723
  if ( is_user_logged_in() ) {
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via filter
6
- * Version 6.4.19
7
  *
8
  */
9
 
@@ -266,6 +266,7 @@ global $wppa_revno;
266
  'reverse' => '',
267
  'landing' => '',
268
  'admin' => '',
 
269
  ), $xatts );
270
 
271
  // Find occur
@@ -348,7 +349,10 @@ global $wppa_revno;
348
  $wppa['film_on'] = '1';
349
  $wppa['start_photo'] = $atts['photo'];
350
  break;
351
-
 
 
 
352
  case 'filmonly':
353
  $wppa['start_album'] = $atts['album'];
354
  $wppa['is_slideonly'] = '1';
@@ -356,7 +360,6 @@ global $wppa_revno;
356
  $wppa['film_on'] = '1';
357
  $wppa['start_photo'] = $atts['photo'];
358
  break;
359
-
360
  case 'photo':
361
  $wppa['single_photo'] = $atts['photo'];
362
  break;
@@ -366,14 +369,20 @@ global $wppa_revno;
366
  break;
367
  case 'slphoto':
368
  $wppa['is_slide'] = '1';
369
- $wppa['single_photo'] = $atts['photo']; // start_photo
 
370
  $wppa['is_single'] = '1';
371
  break;
372
  case 'autopage':
373
  $wppa['is_autopage'] = '1';
374
  break;
375
  case 'upload':
376
- $wppa['start_album'] = $atts['album'];
 
 
 
 
 
377
  $wppa['is_upload'] = true;
378
  break;
379
  case 'multitag':
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via filter
6
+ * Version 6.5.03
7
  *
8
  */
9
 
266
  'reverse' => '',
267
  'landing' => '',
268
  'admin' => '',
269
+ 'parent' => '',
270
  ), $xatts );
271
 
272
  // Find occur
349
  $wppa['film_on'] = '1';
350
  $wppa['start_photo'] = $atts['photo'];
351
  break;
352
+ case 'slidef':
353
+ $wppa['start_album'] = $atts['album'];
354
+ $wppa['is_slide'] = '1';
355
+ $wppa['film_on'] = '1';
356
  case 'filmonly':
357
  $wppa['start_album'] = $atts['album'];
358
  $wppa['is_slideonly'] = '1';
360
  $wppa['film_on'] = '1';
361
  $wppa['start_photo'] = $atts['photo'];
362
  break;
 
363
  case 'photo':
364
  $wppa['single_photo'] = $atts['photo'];
365
  break;
369
  break;
370
  case 'slphoto':
371
  $wppa['is_slide'] = '1';
372
+ $wppa['single_photo'] = $atts['photo'];
373
+ $wppa['start_photo'] = $atts['photo'];
374
  $wppa['is_single'] = '1';
375
  break;
376
  case 'autopage':
377
  $wppa['is_autopage'] = '1';
378
  break;
379
  case 'upload':
380
+ if ( $atts['parent'] ) {
381
+ $wppa['start_album'] = wppa_alb_to_enum_children( $atts['parent'] );
382
+ }
383
+ else {
384
+ $wppa['start_album'] = $atts['album'];
385
+ }
386
  $wppa['is_upload'] = true;
387
  break;
388
  case 'multitag':
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.5.02
7
  *
8
  */
9
 
@@ -4275,6 +4275,7 @@ static $done;
4275
 
4276
  // Do Upload
4277
  if ( $may_upload ) {
 
4278
  if ( wppa_get_post( 'wppa-upload-album' ) ) { // Upload photo
4279
  $nonce = wppa_get_post( 'nonce' );
4280
  $ok = wp_verify_nonce( $nonce, 'wppa-check' );
@@ -4296,6 +4297,7 @@ static $done;
4296
  if ( $iret ) {
4297
  $uploaded_ids[] = $iret;
4298
  $done++;
 
4299
  }
4300
  else $fail++;
4301
  }
@@ -4312,6 +4314,7 @@ static $done;
4312
  if ( $iret ) {
4313
  $uploaded_ids[] = $iret;
4314
  $done++;
 
4315
  }
4316
  else $fail++;
4317
  }
@@ -4337,7 +4340,7 @@ static $done;
4337
 
4338
  $post_content = $pretxt;
4339
  foreach( $uploaded_ids as $id ) {
4340
- $post_content .= '[wppa type="mphoto" photo="' . $id . '"][/wppa]';
4341
  }
4342
  $post_content .= $posttxt;
4343
 
@@ -4345,6 +4348,7 @@ static $done;
4345
  $post = sanitize_post( $post, 'db' );
4346
 
4347
  $iret = wp_insert_post( $post );
 
4348
  }
4349
 
4350
  // ADD POINTS
@@ -4358,6 +4362,17 @@ static $done;
4358
  else {
4359
  wppa_alert( '', $reload );
4360
  }
 
 
 
 
 
 
 
 
 
 
 
4361
  }
4362
  if ( $fail ) {
4363
  if ( ! $done ) {
@@ -4761,7 +4776,7 @@ function wppa_normalize_quotes( $xtext ) {
4761
  function wppa_have_photos( $xwidth = '0' ) {
4762
 
4763
  if ( !is_search() ) return false;
4764
- $width = $xwidth ? $xwidth : wppa_get_container_width();
4765
 
4766
  wppa( 'searchresults', wppa_albums( '', '', $width ) );
4767
  wppa( 'any', strlen( wppa( 'searchresults' ) ) > 0 );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.5.03
7
  *
8
  */
9
 
4275
 
4276
  // Do Upload
4277
  if ( $may_upload ) {
4278
+ $blogged = false;
4279
  if ( wppa_get_post( 'wppa-upload-album' ) ) { // Upload photo
4280
  $nonce = wppa_get_post( 'nonce' );
4281
  $ok = wp_verify_nonce( $nonce, 'wppa-check' );
4297
  if ( $iret ) {
4298
  $uploaded_ids[] = $iret;
4299
  $done++;
4300
+ wppa_set_last_album( $alb );
4301
  }
4302
  else $fail++;
4303
  }
4314
  if ( $iret ) {
4315
  $uploaded_ids[] = $iret;
4316
  $done++;
4317
+ wppa_set_last_album( $alb );
4318
  }
4319
  else $fail++;
4320
  }
4340
 
4341
  $post_content = $pretxt;
4342
  foreach( $uploaded_ids as $id ) {
4343
+ $post_content .= str_replace( '#id', $id, wppa_opt( 'blog_it_shortcode' ) );
4344
  }
4345
  $post_content .= $posttxt;
4346
 
4348
  $post = sanitize_post( $post, 'db' );
4349
 
4350
  $iret = wp_insert_post( $post );
4351
+ $blogged = true;
4352
  }
4353
 
4354
  // ADD POINTS
4362
  else {
4363
  wppa_alert( '', $reload );
4364
  }
4365
+
4366
+ // Blogged?
4367
+ if ( $blogged ) {
4368
+ if ( wppa_switch( 'fe_alert' ) ) {
4369
+ if ( $status == 'pending' ) {
4370
+ wppa_alert( __( 'Your post is awaiting moderation.', 'wp-photo-album-plus' ) );
4371
+ }
4372
+ }
4373
+ echo '<script type="text/javascript" >document.location.href=\'' . home_url() . '\';</script>';
4374
+ wppa_exit();
4375
+ }
4376
  }
4377
  if ( $fail ) {
4378
  if ( ! $done ) {
4776
  function wppa_have_photos( $xwidth = '0' ) {
4777
 
4778
  if ( !is_search() ) return false;
4779
+ $width = $xwidth ? $xwidth : '';//wppa_get_container_width();
4780
 
4781
  wppa( 'searchresults', wppa_albums( '', '', $width ) );
4782
  wppa( 'any', strlen( wppa( 'searchresults' ) ) > 0 );
wppa-init.php CHANGED
@@ -307,9 +307,21 @@ global $wpdb;
307
  $msg .= '<br /><br />';
308
  foreach( $has_wppa_scripts as $item ) {
309
  $msg .= $item['ID'] . ' <a href="'. admin_url( 'post.php?post=' . $item['ID'] . '&action=edit' ) .'" title="Edit this ' . $item['post_type'] . '" >' . $item['post_title'] . '</a>' .
310
- ' at loc:' . strpos( $item['post_content'], '%%wppa%%' ) . ' :' . htmlspecialchars( substr( $item['post_content'] , strpos( $item['post_content'], '%%wppa%%' ), 32 ) ) . '...' .
311
  '<br />';
312
  }
 
 
 
 
 
 
 
 
 
 
 
 
313
  $msg .= '<br />' . sprintf( __( 'For more information see the %s documentation page', 'wp-photo-album-plus' ), '<a href="http://wppa.nl/changelog/script-to-shortcode-conversion/" target="_blank" >Script to shortcode conversion</a>' );
314
  $msg .= '<br /><div style="float:right;" ><input type="checkbox" onchange="wppaDismissAdminNotice(\'dismiss_admin_notice_scripts_are_obsolete\', this);" > Dismiss this message</div><div style="clear:both;" ></div>';
315
  $msg .= wp_nonce_field('wppa-nonce', 'wppa-nonce', false, false);
307
  $msg .= '<br /><br />';
308
  foreach( $has_wppa_scripts as $item ) {
309
  $msg .= $item['ID'] . ' <a href="'. admin_url( 'post.php?post=' . $item['ID'] . '&action=edit' ) .'" title="Edit this ' . $item['post_type'] . '" >' . $item['post_title'] . '</a>' .
310
+ ' at loc:' . strpos( $item['post_content'], '%%wppa%%' ) . ' :' . htmlspecialchars( substr( $item['post_content'] , strpos( $item['post_content'], '%%wppa%%' ), 60 ) ) . '...' .
311
  '<br />';
312
  }
313
+ $msg .= '<br />' .
314
+ '<div style="text-align:center;" >' .
315
+ '<em style="float:left;" >Enter your script to convert here:</em>' .
316
+ '<em>Click to convert</em>' .
317
+ '<em style="float:right;" >Copy the result into your page/post:</em>' .
318
+ '<br />' .
319
+ '<input type="text" id="script" style="width:40%; float:left;" />' .
320
+ '<input type="button" value="' . esc_attr( '>>>>>' ) . '" onclick="wppaConvertScriptToShortcode(\'script\',\'shortcode\')" />' .
321
+ '<input type="text" id="shortcode" style="width:40%; float:right;" />' .
322
+ '</div>' .
323
+ '<br />';
324
+
325
  $msg .= '<br />' . sprintf( __( 'For more information see the %s documentation page', 'wp-photo-album-plus' ), '<a href="http://wppa.nl/changelog/script-to-shortcode-conversion/" target="_blank" >Script to shortcode conversion</a>' );
326
  $msg .= '<br /><div style="float:right;" ><input type="checkbox" onchange="wppaDismissAdminNotice(\'dismiss_admin_notice_scripts_are_obsolete\', this);" > Dismiss this message</div><div style="clear:both;" ></div>';
327
  $msg .= wp_nonce_field('wppa-nonce', 'wppa-nonce', false, false);
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.5.02
7
  *
8
  */
9
 
@@ -25,48 +25,7 @@ global $no_default;
25
  global $wppa_tags;
26
  global $wp_version;
27
 
28
- //update_option('test_option', '[:en]New[:nl]Nieuw[:fr]Nouveau[:]');
29
- //echo get_option('test_option').'<br />';
30
- //update_option('test_array_option', array('1'=>'[:en]New[:nl]Nieuw[:fr]Nouveau[:]'));
31
- //$temp = get_option('test_array_option');
32
- //echo $temp['1'].'<br />';
33
- //echo serialize($temp);
34
-
35
- //require_once 'wppa-photo-admin-autosave.php';
36
- //wppa_fe_edit_new_style(4145);
37
  // Test area
38
- // echo '<!-- Start Test area ---><br />';
39
- //$users = get_users( array( 'role' => 'administrator' ) );
40
- //foreach( $users as $user ) {
41
- // echo $user->data->user_login,'<br />';
42
- // $us = get_user_by('ID', $user['data']['id']);
43
- //}
44
- //var_dump($users);
45
- // To demonstrate wpautop() destructifies inline script:
46
-
47
- // Large version:
48
- //$str = '<script type="text/javascript">/* [CDATA[ */
49
- // wppaStoreSlideInfo( \'12\',\'0\',\'/wp-content/uploads/wppa/133.jpg?ver=233\',\' max-width:1020px; max-height:576px;margin:0 auto; border: 1px solid #777777; background-color:#cccccc; padding:7px; border-radius:7px;\',\'510\',\'288\',\'coverphoto (admin)\',\'coverphoto\',\' <div style="float:right; margin-right:6px;" ><a style="color:green;" onclick="_wppaStop( 12 );wppaEditPhoto( 12, 133 ); return false;" >Edit</a></div> <div style="float:right; margin-right:6px;" ><a style="color:red;" onclick="_wppaStop( 12 );if ( confirm( &quot;Are you sure you want to remove this photo?&quot; ) ) wppaAjaxRemovePhoto( 12, 133, true ); return false;">Delete</a></div><div style="clear:both"></div><p>Views: 6<br />\nThumbnail: <a href="/wp-content/uploads/wppa/thumbs/133.jpg" rel="nofollow">/wp-content/uploads/wppa/thumbs/133.jpg</a><br />\nScreenres: <a href="/wp-content/uploads/wppa/133.jpg" rel="nofollow">/wp-content/uploads/wppa/133.jpg</a><br />\nHires: <a href="/wp-content/uploads/wppa-source/album-75/coverphoto.jpg" rel="nofollow">/wp-content/uploads/wppa-source/album-75/coverphoto.jpg</a><br />\nPermalink: <a href="/wp-content/albums/Sub-van-tesje/coverphoto.jpg" rel="nofollow">/wp-content/albums/Sub-van-tesje/coverphoto.jpg</a><br />\nAugust 13, 2015 3:21 pm</p>\n\',\'133\',\'0|0\',\'0\',\'0\',\'/generic-2/?lang=en&wppa-album=75&wppa-cover=0&wppa-slide&wppa-occur=1&wppa-photo=63\',\'\',\'Zoom in\',\'\',\'0\',\'<div id="wppa-comform-wrap-12" style="display:none;" ><form id="wppa-commentform-12" class="wppa-comment-form" action="/generic-2/?lang=en&amp;wppa-album=75&wppa-occur=1&wppa-photo=133" method="post" onsubmit="return wppaValidateComment( 12 )" ><input type="hidden" id="wppa-nonce-12" name="wppa-nonce-12" value="be4355e748" /><input type="hidden" name="wppa-album" value="75" /><input type="hidden" name="wppa-returnurl" id="wppa-returnurl-12" value="/generic-2/?lang=en&amp;wppa-album=75&wppa-occur=1&wppa-photo=133" /><input type="hidden" name="wppa-occur" value="1" /><table id="wppacommenttable-12" style="margin:0;"><tbody><tr valign="top" style="display:none; "><td class="wppa-box-text wppa-td" style="width:30%; " >Your name:</td><td class="wppa-box-text wppa-td" style="width:70%; " ><input type="text" name="wppa-comname" id="wppa-comname-12" style="width:100%; " value="admin" /></td></tr><tr valign="top" style="display:none; "><td class="wppa-box-text wppa-td" style="width:30%; " >Your email:</td><td class="wppa-box-text wppa-td" style="width:70%; " ><input type="text" name="wppa-comemail" id="wppa-comemail-12" style="width:100%;" value="opajaap@opajaap.nl" /></td></tr><tr valign="top" style="vertical-align:top;"><td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:30%; " >Your comment:<br />admin<br />10 + 11 = <input type="text" id="wppa-captcha-12" name="wppa-captcha" style="width:20%;" />&nbsp;<input type="button" name="commentbtn" onclick="wppaAjaxComment( 12, 133 )" value="Send!" style="margin:0 4px 0 0;" /><img id="wppa-comment-spin-12" src="/wp-content/plugins/wp-photo-album-plus/images/wpspin.gif" style="display:none;" /></td><td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:70%; " ><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; ;-) &quot; )" title=";-)" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f609.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :| &quot; )" title="|" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f610.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :x &quot; )" title="x" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f621.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :twisted: &quot; )" title="twisted" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f608.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :smile: &quot; )" title="smile" ><img src="/wp-includes/images/smilies/simple-smile.png" alt=":smile:" class="wp-smiley" style="height: 1em; max-height: 1em;" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :shock: &quot; )" title="shock" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f62f.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :sad: &quot; )" title="sad" ><img src="/wp-includes/images/smilies/frownie.png" alt=":sad:" class="wp-smiley" style="height: 1em; max-height: 1em;" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :roll: &quot; )" title="roll" ><img src="/wp-includes/images/smilies/rolleyes.png" alt=":roll:" class="wp-smiley" style="height: 1em; max-height: 1em;" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :razz: &quot; )" title="razz" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f61b.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :oops: &quot; )" title="oops" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f633.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :o &quot; )" title="o" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f62e.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :mrgreen: &quot; )" title="mrgreen" ><img src="/wp-includes/images/smilies/mrgreen.png" alt=":mrgreen:" class="wp-smiley" style="height: 1em; max-height: 1em;" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :lol: &quot; )" title="lol" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f606.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :idea: &quot; )" title="idea" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f4a1.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :grin: &quot; )" title="grin" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f600.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :evil: &quot; )" title="evil" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f47f.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :cry: &quot; )" title="cry" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f625.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :cool: &quot; )" title="cool" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f60e.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :arrow: &quot; )" title="arrow" ><img class="emoji" draggable="false" alt="?" src="http://s.w.org/images/core/emoji/72x72/27a1.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :???: &quot; )" title="???" ><img class="emoji" draggable="false" alt="??" src="http://s.w.org/images/core/emoji/72x72/1f615.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :?: &quot; )" title="?" ><img class="emoji" draggable="false" alt="?" src="http://s.w.org/images/core/emoji/72x72/2753.png" /></a><a onclick="wppaInsertAtCursor( document.getElementById( &quot;wppa-comment-12&quot; ), &quot; :!: &quot; )" title="!" ><img class="emoji" draggable="false" alt="?" src="http://s.w.org/images/core/emoji/72x72/2757.png" /></a><textarea name="wppa-comment" id="wppa-comment-12" style="height:60px; width:100%; "></textarea></td></tr></tbody></table></form></div><div id="wppa-comfooter-wrap-12" style="display:block;" ><table id="wppacommentfooter-12" class="wppa-comment-form" style="margin:0;"><tbody><tr style="text-align:center;"><td style="text-align:center; cursor:pointer;" ><a onclick="wppaOpenComments( 12, -1 ); return false;" >Leave a comment</a></td></tr></tbody></table></div><div style="clear:both"></div>\',\'<div id="iptccontent-12" >No IPTC data</div>\',\'<div id="exifcontent-12" ><a class="-wppa-exif-table-12" onclick="wppaStopShow( 12 );jQuery( &#039;.wppa-exif-table-12&#039; ).css( &#039;display&#039;, &#039;&#039; );jQuery( &#039;.-wppa-exif-table-12&#039; ).css( &#039;display&#039;, &#039;none&#039; );" style="cursor:pointer;display:inline;" >Show EXIF data</a><a class="wppa-exif-table-12" onclick="jQuery( &#039;.wppa-exif-table-12&#039; ).css( &#039;display&#039;, &#039;none&#039; );jQuery( &#039;.-wppa-exif-table-12&#039; ).css( &#039;display&#039;, &#039;&#039; )" style="cursor:pointer;display:none;" >Hide EXIF data</a><div style="clear:both;" ></div><table class="wppa-exif-table-12 wppa-detail" style="display:none; border:0 none; margin:0;" ><tbody><tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" ><td class="wppa-exif-label wppa-box-text wppa-td" style="" >Orientation:</td><td class="wppa-exif-value wppa-box-text wppa-td" style="" >1</td></tr><tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" ><td class="wppa-exif-label wppa-box-text wppa-td" style="" >Software:</td><td class="wppa-exif-value wppa-box-text wppa-td" style="" >Microsoft Windows Photo Viewer 6.1.7600.16385</td></tr><tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" ><td class="wppa-exif-label wppa-box-text wppa-td" style="" >DateTime:</td><td class="wppa-exif-value wppa-box-text wppa-td" style="" >2014:05:30 10:45:43</td></tr><tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" ><td class="wppa-exif-label wppa-box-text wppa-td" style="" >Exif_IFD_Pointer:</td><td class="wppa-exif-value wppa-box-text wppa-td" style="" >2200</td></tr></tbody></table></div>\',\'&lt;input type=&quot;button&quot; title=&quot;Download&quot; style=&quot;cursor:pointer; margin-bottom:0px; max-width:500px;&quot; class=&quot;wppa-download-button&quot; onclick=&quot;wppaAjaxMakeOrigName( 12, 133 );&quot; value=&quot;Download: coverphoto (admin)&quot; /&gt;&lt;br /&gt;Views: 6&lt;br /&gt; Thumbnail: &lt;a href=&quot;/wp-content/uploads/wppa/thumbs/133.jpg&quot; rel=&quot;nofollow&quot;&gt;/wp-content/uploads/wppa/thumbs/133.jpg&lt;/a&gt;&lt;br /&gt; Screenres: &lt;a href=&quot;/wp-content/uploads/wppa/133.jpg&quot; rel=&quot;nofollow&quot;&gt;/wp-content/uploads/wppa/133.jpg&lt;/a&gt;&lt;br /&gt; Hires: &lt;a href=&quot;/wp-content/uploads/wppa-source/album-75/coverphoto.jpg&quot; rel=&quot;nofollow&quot;&gt;/wp-content/uploads/wppa-source/album-75/coverphoto.jpg&lt;/a&gt;&lt;br /&gt; Permalink: &lt;a href=&quot;/wp-content/albums/Sub-van-tesje/coverphoto.jpg&quot; rel=&quot;nofollow&quot;&gt;/wp-content/albums/Sub-van-tesje/coverphoto.jpg&lt;/a&gt;&lt;br /&gt; August 13, 2015 3:21 pm&lt;br /&gt;&lt;div style=&quot;float:left; padding:2px;&quot; &gt;&lt;a title=&quot;Tweet coverphoto on Twitter&quot; href=&quot;https://twitter.com/intent/tweet?text=See+this+image+on+WPPA%2B+Beta+test: http%3A%2F%2Fbeta.opajaap.nl%2Fgeneric-2%2F%3Flang%3Den%26wppa-album%3D75%26wppa-photo%3D133%26wppa-cover%3D0%26wppa-occur%3D1%26wppa-single%3D1 coverphoto: Views%3A+6+%0D%0AThumbnail%3A+++%0D%0AScreenres%3A+++%0D%0AHires%3A+++%0D%0APermalink%3A+++%0D%0A...&quot; target=&quot;_blank&quot; &gt;&lt;img src=&quot;/wp-content/plugins/wp-photo-album-plus/images/twitter.png&quot; style=&quot;height:32px;&quot; alt=&quot;Share on Twitter&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;float:left; padding:2px;&quot; &gt;&lt;a title=&quot;Share coverphoto on Pinterest&quot; href=&quot;http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fbeta.opajaap.nl%2Fgeneric-2%2F%3Flang%3Den%26wppa-album%3D75%26wppa-photo%3D133%26wppa-cover%3D0%26wppa-occur%3D1%26wppa-single%3D1&amp;media=http%3A%2F%2Fbeta.opajaap.nl%2Fwp-content%2Fuploads%2Fwppa%2F133.jpg%3Fver%3D233&amp;description=See+this+image+on+WPPA%2B+Beta+test: Views%3A+6+%0D%0AThumbnail%3A+++%0D%0AScreenres%3A+++%0D%0AHires%3A+++%0D%0APermalink%3A+++%0D%0AAugust+13%2C+2015+3%3A21+pm&quot; target=&quot;_blank&quot; &gt;&lt;img src=&quot;/wp-content/plugins/wp-photo-album-plus/images/pinterest.png&quot; style=&quot;height:32px;&quot; alt=&quot;Share on Pinterest&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;fb-share-button&quot; style=&quot;float:left; max-width:62px; max-height:64px; overflow:show;&quot; data-width=&quot;200&quot; data-href=&quot;/generic-2/?lang=en&amp;wppa-album=75&amp;wppa-photo=133&amp;wppa-cover=0&amp;wppa-occur=1&amp;wppa-single=1&quot; data-type=&quot;button&quot; &gt;&lt;/div&gt;[script&gt;wppaFbInit();[/script&gt;&lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;\',\'/generic-2/wppaspec/oc1/lnen/cv0/ab75/pt133\',\'<div style="float:left; padding:2px;" ><a title="Tweet coverphoto on Twitter" href="https://twitter.com/intent/tweet?text=See+this+image+on+WPPA%2B+Beta+test: http%3A%2F%2Fbeta.opajaap.nl%2Fgeneric-2%2F%3Flang%3Den%26wppa-album%3D75%26wppa-photo%3D133%26wppa-cover%3D0%26wppa-occur%3D1%26wppa-single%3D1 coverphoto: Views%3A+6+%0D%0AThumbnail%3A+++%0D%0AScreenres%3A+++%0D%0AHires%3A+++%0D%0APermalink%3A+++%0D%0A..." target="_blank" ><img src="/wp-content/plugins/wp-photo-album-plus/images/twitter.png" style="height:32px;" alt="Share on Twitter" /></a></div><div style="float:left; padding:2px;" ><a title="Share coverphoto on Pinterest" href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fbeta.opajaap.nl%2Fgeneric-2%2F%3Flang%3Den%26wppa-album%3D75%26wppa-photo%3D133%26wppa-cover%3D0%26wppa-occur%3D1%26wppa-single%3D1&media=http%3A%2F%2Fbeta.opajaap.nl%2Fwp-content%2Fuploads%2Fwppa%2F133.jpg%3Fver%3D233&description=See+this+image+on+WPPA%2B+Beta+test: Views%3A+6+%0D%0AThumbnail%3A+++%0D%0AScreenres%3A+++%0D%0AHires%3A+++%0D%0APermalink%3A+++%0D%0AAugust+13%2C+2015+3%3A21+pm" target="_blank" ><img src="/wp-content/plugins/wp-photo-album-plus/images/pinterest.png" style="height:32px;" alt="Share on Pinterest" /></a></div><div class="fb-share-button" style="float:left; " data-width="200" data-href="/generic-2/?lang=en&wppa-album=75&wppa-photo=133&wppa-cover=0&wppa-occur=1&wppa-single=1" data-type="button" ></div>[script>wppaFbInit();[/script><div style="clear:both"></div>\',\'\',\'/wp-content/uploads/wppa-source/album-75/coverphoto.jpg\',\'\',\'\' );
50
- // /* ]] */</script>';
51
- //echo $str;
52
- //echo '<br/>';
53
- //echo wpautop($str);
54
-
55
- // Trimmed down version:
56
- //$str = '
57
- //<script type="text/javascript">
58
- //alert( \'<div style="float:right; margin-right:6px;" >Edit</div><div style="float:right; margin-right:6px;" >Delete</div>\' );
59
- //</script>';
60
- //echo $str;
61
- //echo '<br/>';
62
- //echo wpautop($str);
63
-
64
-
65
- // To demonstrate wpautop treates html comments wrongly:
66
-
67
- // $str = '<div>My div1</div><!-- comment --><div>My div2</div>';
68
- // echo $str.'<br/>'.wpautop($str);
69
- // echo '<!-- End Test area ---><br />';
70
  // End test area
71
 
72
  // Verify some urls; set to default if empty
@@ -894,7 +853,7 @@ global $wp_version;
894
  $desc = __('The maximum height photos will be displayed in slideshows.', 'wp-photo-album-plus');
895
  $help = esc_js(__('Enter the largest size in pixels as how you want your photos to be displayed.', 'wp-photo-album-plus'));
896
  $help .= '\n'.esc_js(__('This setting defines the height of the space reserved for photos in slideshows.', 'wp-photo-album-plus'));
897
- $help .= '\n'.esc_js(__('If you change the width of a display by the %%size= command, this value changes proportionally to match the aspect ratio as defined by this and the previous setting.', 'wp-photo-album-plus'));
898
  $slug = 'wppa_maxheight';
899
  $html = wppa_input($slug, '40px', '', __('pixels high', 'wp-photo-album-plus'));
900
  $clas = '';
@@ -2888,7 +2847,7 @@ global $wp_version;
2888
  $clas = 'wppa_feup';
2889
  $tags = 'upload';
2890
  wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
2891
-
2892
  $name = __('Blog It!', 'wp-photo-album-plus');
2893
  $desc = __('Enable blogging photos.', 'wp-photo-album-plus');
2894
  $help = esc_js( __('Users need the capability edit_posts to directly blog photos.', 'wp-photo-album-plus'));
@@ -2907,6 +2866,15 @@ global $wp_version;
2907
  $tags = 'upload';
2908
  wppa_setting($slug, '17', $name, $desc, $html, $help, $clas, $tags);
2909
 
 
 
 
 
 
 
 
 
 
2910
  }
2911
  wppa_setting_subheader( 'J', '1', __( 'Miscellaneous visibility settings' , 'wp-photo-album-plus') );
2912
  {
@@ -3587,7 +3555,6 @@ global $wp_version;
3587
  $name = __('Render shortcode always', 'wp-photo-album-plus');
3588
  $desc = __('This will skip the check on proper initialisation.', 'wp-photo-album-plus');
3589
  $help = esc_js(__('This setting is required for certain themes like Gantry to prevent the display of wppa placeholders like [WPPA+ Photo display].', 'wp-photo-album-plus'));
3590
- $help .= '\n\n'.esc_js(__('If this check is needed, you can use shortcodes like [wppa ...] only, not scripts like %%wppa%%.', 'wp-photo-album-plus'));
3591
  $slug = 'wppa_render_shortcode_always';
3592
  $html = wppa_checkbox($slug);
3593
  $clas = '';
@@ -5438,7 +5405,7 @@ global $wp_version;
5438
  $desc = __('Thumbnail link.', 'wp-photo-album-plus');
5439
  $help = esc_js(__('Select the type of link you want, or no link at all.', 'wp-photo-album-plus'));
5440
  $help .= '\n'.esc_js(__('If you select the fullsize photo on its own, it will be stretched to fit, regardless of that setting.', 'wp-photo-album-plus')); /* oneofone is treated as portrait only */
5441
- $help .= '\n'.esc_js(__('Note that a page must have at least %%wppa%% or [wppa][/wppa] in its content to show up the photo(s).', 'wp-photo-album-plus'));
5442
  $slug1 = 'wppa_thumb_linktype';
5443
  $slug2 = 'wppa_thumb_linkpage';
5444
  wppa_verify_page($slug2);
@@ -5488,7 +5455,7 @@ global $wp_version;
5488
  $desc = __('Single photo link.', 'wp-photo-album-plus');
5489
  $help = esc_js(__('Select the type of link you want, or no link at all.', 'wp-photo-album-plus'));
5490
  $help .= '\n'.esc_js(__('If you select the fullsize photo on its own, it will be stretched to fit, regardless of that setting.', 'wp-photo-album-plus')); /* oneofone is treated as portrait only */
5491
- $help .= '\n'.esc_js(__('Note that a page must have at least %%wppa%% or [wppa][/wppa] in its content to show up the photo(s).', 'wp-photo-album-plus'));
5492
  $slug1 = 'wppa_sphoto_linktype';
5493
  $slug2 = 'wppa_sphoto_linkpage';
5494
  wppa_verify_page($slug2);
@@ -5530,7 +5497,7 @@ global $wp_version;
5530
  $desc = __('Media-like photo link.', 'wp-photo-album-plus');
5531
  $help = esc_js(__('Select the type of link you want, or no link at all.', 'wp-photo-album-plus'));
5532
  $help .= '\n'.esc_js(__('If you select the fullsize photo on its own, it will be stretched to fit, regardless of that setting.', 'wp-photo-album-plus')); /* oneofone is treated as portrait only */
5533
- $help .= '\n'.esc_js(__('Note that a page must have at least %%wppa%% or [wppa][/wppa] in its content to show up the photo(s).', 'wp-photo-album-plus'));
5534
  $slug1 = 'wppa_mphoto_linktype';
5535
  $slug2 = 'wppa_mphoto_linkpage';
5536
  wppa_verify_page($slug2);
@@ -6118,7 +6085,7 @@ global $wp_version;
6118
  $clas = '';
6119
  $tags = 'access,album';
6120
  wppa_setting($slug, '2', $name, $desc, $html, $help, $clas, $tags);
6121
-
6122
  $name = __('User create Albums Captcha', 'wp-photo-album-plus');
6123
  $desc = __('Uer must answer security question.', 'wp-photo-album-plus');
6124
  $help = '';
@@ -8057,7 +8024,7 @@ global $wp_version;
8057
 
8058
  $name = __('Grant parent', 'wp-photo-album-plus');
8059
  $desc = __('The parent album of the auto created albums.', 'wp-photo-album-plus');
8060
- $help = '';
8061
  $slug = 'wppa_grant_parent';
8062
  $opts = array( __('--- none ---', 'wp-photo-album-plus'), __('--- separate ---', 'wp-photo-album-plus') );
8063
  $vals = array( '0', '-1');
@@ -8068,7 +8035,7 @@ global $wp_version;
8068
  $vals[] = $alb['id'];
8069
  }
8070
  }
8071
- $html = wppa_select($slug, $opts, $vals);
8072
  $clas = '';
8073
  $tags = 'system,album';
8074
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
@@ -8168,7 +8135,7 @@ global $wp_version;
8168
  {
8169
  $name = __('Search page', 'wp-photo-album-plus');
8170
  $desc = __('Display the search results on page.', 'wp-photo-album-plus');
8171
- $help = esc_js(__('Select the page to be used to display search results. The page MUST contain %%wppa%% or [wppa][/wppa].', 'wp-photo-album-plus'));
8172
  $help .= '\n'.esc_js(__('You may give it the title "Search results" or something alike.', 'wp-photo-album-plus'));
8173
  $help .= '\n'.esc_js(__('Or you ou may use the standard page on which you display the generic album.', 'wp-photo-album-plus'));
8174
  $slug = 'wppa_search_linkpage';
@@ -10069,7 +10036,7 @@ function wppa_htmlerr($slug) {
10069
  $title = __('You can not have popup and lightbox on thumbnails at the same time. Uncheck either Table IV-C8 or choose a different linktype in Table VI-2.', 'wp-photo-album-plus');
10070
  break;
10071
  default:
10072
- $title = __('It is important that you select a page that contains at least %%wppa%% or [wppa][/wppa].', 'wp-photo-album-plus');
10073
  $title .= " ".__('If you ommit this, the link will not work at all or simply refresh the (home)page.', 'wp-photo-album-plus');
10074
  break;
10075
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.5.03
7
  *
8
  */
9
 
25
  global $wppa_tags;
26
  global $wp_version;
27
 
 
 
 
 
 
 
 
 
 
28
  // Test area
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  // End test area
30
 
31
  // Verify some urls; set to default if empty
853
  $desc = __('The maximum height photos will be displayed in slideshows.', 'wp-photo-album-plus');
854
  $help = esc_js(__('Enter the largest size in pixels as how you want your photos to be displayed.', 'wp-photo-album-plus'));
855
  $help .= '\n'.esc_js(__('This setting defines the height of the space reserved for photos in slideshows.', 'wp-photo-album-plus'));
856
+ $help .= '\n'.esc_js(__('If you change the width of a display by the size=".." shortcode attribute, this value changes proportionally to match the aspect ratio as defined by this and the previous setting.', 'wp-photo-album-plus'));
857
  $slug = 'wppa_maxheight';
858
  $html = wppa_input($slug, '40px', '', __('pixels high', 'wp-photo-album-plus'));
859
  $clas = '';
2847
  $clas = 'wppa_feup';
2848
  $tags = 'upload';
2849
  wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
2850
+
2851
  $name = __('Blog It!', 'wp-photo-album-plus');
2852
  $desc = __('Enable blogging photos.', 'wp-photo-album-plus');
2853
  $help = esc_js( __('Users need the capability edit_posts to directly blog photos.', 'wp-photo-album-plus'));
2866
  $tags = 'upload';
2867
  wppa_setting($slug, '17', $name, $desc, $html, $help, $clas, $tags);
2868
 
2869
+ $name = __('Blog It shortcode', 'wp-photo-album-plus');
2870
+ $desc = __('Shortcode to be used on the blog post', 'wp-photo-album-plus');
2871
+ $help = esc_js(__('Make sure it contains photo="#id"', 'wp-photo-album-plus'));
2872
+ $slug = 'wppa_blog_it_shortcode';
2873
+ $html = wppa_input($slug, '85%');
2874
+ $clas = 'wppa_feup';
2875
+ $tags = 'upload';
2876
+ wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
2877
+
2878
  }
2879
  wppa_setting_subheader( 'J', '1', __( 'Miscellaneous visibility settings' , 'wp-photo-album-plus') );
2880
  {
3555
  $name = __('Render shortcode always', 'wp-photo-album-plus');
3556
  $desc = __('This will skip the check on proper initialisation.', 'wp-photo-album-plus');
3557
  $help = esc_js(__('This setting is required for certain themes like Gantry to prevent the display of wppa placeholders like [WPPA+ Photo display].', 'wp-photo-album-plus'));
 
3558
  $slug = 'wppa_render_shortcode_always';
3559
  $html = wppa_checkbox($slug);
3560
  $clas = '';
5405
  $desc = __('Thumbnail link.', 'wp-photo-album-plus');
5406
  $help = esc_js(__('Select the type of link you want, or no link at all.', 'wp-photo-album-plus'));
5407
  $help .= '\n'.esc_js(__('If you select the fullsize photo on its own, it will be stretched to fit, regardless of that setting.', 'wp-photo-album-plus')); /* oneofone is treated as portrait only */
5408
+ $help .= '\n'.esc_js(__('Note that a page must have at least [wppa][/wppa] in its content to show up the photo(s).', 'wp-photo-album-plus'));
5409
  $slug1 = 'wppa_thumb_linktype';
5410
  $slug2 = 'wppa_thumb_linkpage';
5411
  wppa_verify_page($slug2);
5455
  $desc = __('Single photo link.', 'wp-photo-album-plus');
5456
  $help = esc_js(__('Select the type of link you want, or no link at all.', 'wp-photo-album-plus'));
5457
  $help .= '\n'.esc_js(__('If you select the fullsize photo on its own, it will be stretched to fit, regardless of that setting.', 'wp-photo-album-plus')); /* oneofone is treated as portrait only */
5458
+ $help .= '\n'.esc_js(__('Note that a page must have at least [wppa][/wppa] in its content to show up the photo(s).', 'wp-photo-album-plus'));
5459
  $slug1 = 'wppa_sphoto_linktype';
5460
  $slug2 = 'wppa_sphoto_linkpage';
5461
  wppa_verify_page($slug2);
5497
  $desc = __('Media-like photo link.', 'wp-photo-album-plus');
5498
  $help = esc_js(__('Select the type of link you want, or no link at all.', 'wp-photo-album-plus'));
5499
  $help .= '\n'.esc_js(__('If you select the fullsize photo on its own, it will be stretched to fit, regardless of that setting.', 'wp-photo-album-plus')); /* oneofone is treated as portrait only */
5500
+ $help .= '\n'.esc_js(__('Note that a page must have at least [wppa][/wppa] in its content to show up the photo(s).', 'wp-photo-album-plus'));
5501
  $slug1 = 'wppa_mphoto_linktype';
5502
  $slug2 = 'wppa_mphoto_linkpage';
5503
  wppa_verify_page($slug2);
6085
  $clas = '';
6086
  $tags = 'access,album';
6087
  wppa_setting($slug, '2', $name, $desc, $html, $help, $clas, $tags);
6088
+
6089
  $name = __('User create Albums Captcha', 'wp-photo-album-plus');
6090
  $desc = __('Uer must answer security question.', 'wp-photo-album-plus');
6091
  $help = '';
8024
 
8025
  $name = __('Grant parent', 'wp-photo-album-plus');
8026
  $desc = __('The parent album of the auto created albums.', 'wp-photo-album-plus');
8027
+ $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'));
8028
  $slug = 'wppa_grant_parent';
8029
  $opts = array( __('--- none ---', 'wp-photo-album-plus'), __('--- separate ---', 'wp-photo-album-plus') );
8030
  $vals = array( '0', '-1');
8035
  $vals[] = $alb['id'];
8036
  }
8037
  }
8038
+ $html = wppa_select_m($slug, $opts, $vals, '', '', true);
8039
  $clas = '';
8040
  $tags = 'system,album';
8041
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
8135
  {
8136
  $name = __('Search page', 'wp-photo-album-plus');
8137
  $desc = __('Display the search results on page.', 'wp-photo-album-plus');
8138
+ $help = esc_js(__('Select the page to be used to display search results. The page MUST contain [wppa][/wppa].', 'wp-photo-album-plus'));
8139
  $help .= '\n'.esc_js(__('You may give it the title "Search results" or something alike.', 'wp-photo-album-plus'));
8140
  $help .= '\n'.esc_js(__('Or you ou may use the standard page on which you display the generic album.', 'wp-photo-album-plus'));
8141
  $slug = 'wppa_search_linkpage';
10036
  $title = __('You can not have popup and lightbox on thumbnails at the same time. Uncheck either Table IV-C8 or choose a different linktype in Table VI-2.', 'wp-photo-album-plus');
10037
  break;
10038
  default:
10039
+ $title = __('It is important that you select a page that contains at least [wppa][/wppa].', 'wp-photo-album-plus');
10040
  $title .= " ".__('If you ommit this, the link will not work at all or simply refresh the (home)page.', 'wp-photo-album-plus');
10041
  break;
10042
  }
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.5.00
7
  *
8
  */
9
 
@@ -877,6 +877,7 @@ Hide Camera info
877
  'wppa_camera_connect' => 'yes',
878
  'wppa_blog_it' => 'no',
879
  'wppa_blog_it_moderate' => 'yes',
 
880
 
881
  // J Custom datafields
882
  'wppa_album_custom_fields' => 'no',
@@ -1598,9 +1599,9 @@ Hide Camera info
1598
  'wppa_qr_color' => '#000000',
1599
  'wppa_qr_bgcolor' => '#FFFFFF',
1600
 
1601
-
1602
  'wppa_dismiss_admin_notice_scripts_are_obsolete' => 'no',
1603
-
1604
  );
1605
 
1606
  array_walk( $wppa_defaults, 'wppa_set_default', $force );
@@ -1749,3 +1750,41 @@ function wppa_credirmsg($dir) {
1749
  $msg = ' '.sprintf(__('Ask your administrator to give you more rights, or create <b>%s</b> manually using an FTP program.', 'wp-photo-album-plus'), $dir);
1750
  return $msg;
1751
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.5.03
7
  *
8
  */
9
 
877
  'wppa_camera_connect' => 'yes',
878
  'wppa_blog_it' => 'no',
879
  'wppa_blog_it_moderate' => 'yes',
880
+ 'wppa_blog_it_shortcode' => '[wppa type="mphoto" photo="#id"][/wppa]',
881
 
882
  // J Custom datafields
883
  'wppa_album_custom_fields' => 'no',
1599
  'wppa_qr_color' => '#000000',
1600
  'wppa_qr_bgcolor' => '#FFFFFF',
1601
 
1602
+
1603
  'wppa_dismiss_admin_notice_scripts_are_obsolete' => 'no',
1604
+
1605
  );
1606
 
1607
  array_walk( $wppa_defaults, 'wppa_set_default', $force );
1750
  $msg = ' '.sprintf(__('Ask your administrator to give you more rights, or create <b>%s</b> manually using an FTP program.', 'wp-photo-album-plus'), $dir);
1751
  return $msg;
1752
  }
1753
+
1754
+ // Create grated album(s)
1755
+ function wppa_grant_albums( $xparent = false ) {
1756
+ global $wpdb;
1757
+
1758
+ // Create an album if required
1759
+ if ( wppa_switch( 'grant_an_album' )
1760
+ && wppa_switch( 'owner_only' )
1761
+ && is_user_logged_in()
1762
+ && ( current_user_can( 'wppa_upload' ) || wppa_switch( 'user_upload_on' ) ) ) {
1763
+ $owner = wppa_get_user( 'login' );
1764
+ $user = wppa_get_user( wppa_opt( 'grant_name' ) );
1765
+ $parents = explode( ',', wppa_opt( 'grant_parent' ) );
1766
+
1767
+ // If a parent is given, and it is a grant parent, only create the granted album inside this parent. Else create all granted albums
1768
+ if ( $xparent && in_array( $xparent, $parents ) ) {
1769
+ $parents = array( $xparent );
1770
+ }
1771
+
1772
+ // May be multiple granted parents. Check for all parents.
1773
+ foreach( $parents as $parent ) {
1774
+ $albs = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `".WPPA_ALBUMS."` WHERE `owner` = %s AND `a_parent` = %s", $owner, $parent ) );
1775
+ if ( ! $albs ) { // make an album for this user
1776
+ $name = $user;
1777
+ $desc = __( 'Default photo album for' , 'wp-photo-album-plus').' '.$user;
1778
+ $id = wppa_create_album_entry( array ( 'name' => $name, 'description' => $desc, 'a_parent' => $parent ) );
1779
+ if ( $id ) {
1780
+ wppa_log( 'Obs', 'Album ' . $id . ' for ' . $user . 'created.' );
1781
+ }
1782
+ else {
1783
+ wppa_log( 'Err', 'Could not create subalbum of ' . $parent . ' for ' . $user );
1784
+ }
1785
+ wppa_flush_treecounts( $parent );
1786
+ wppa_index_add( 'album', $id );
1787
+ }
1788
+ }
1789
+ }
1790
+ }
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.5.02
7
  *
8
  */
9
 
@@ -1738,7 +1738,10 @@ function wppa_get_og_desc( $id ) {
1738
  // intval('3..7') == '3..7' returns true
1739
  // is_int('3') returns false
1740
  // so we make it ourselves
1741
- function wppa_is_int($var) {
 
 
 
1742
  return ( strval(intval($var)) == strval($var) );
1743
  }
1744
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.5.03
7
  *
8
  */
9
 
1738
  // intval('3..7') == '3..7' returns true
1739
  // is_int('3') returns false
1740
  // so we make it ourselves
1741
+ function wppa_is_int( $var ) {
1742
+ if ( is_array( $var ) ) {
1743
+ return false;
1744
+ }
1745
  return ( strval(intval($var)) == strval($var) );
1746
  }
1747
 
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.5.02
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 = '6502'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-5-02-006'; // 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.5.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
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6503'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-5-03-012'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime(true);