WP Photo Album Plus - Version 6.7.08

Version Description

Download this release

Release Info

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

Code changes from version 6.7.07 to 6.7.08

js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 6.6.30
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -2487,4 +2487,16 @@ function wppaAjaxUpdateTogo(slug) {
2487
  complete: function( xhr ) {
2488
  }
2489
  } );
 
 
 
 
 
 
 
 
 
 
 
 
2490
  }
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 6.7.08
5
  /* Various js routines used in admin pages
6
  */
7
 
2487
  complete: function( xhr ) {
2488
  }
2489
  } );
2490
+ }
2491
+
2492
+ // The js equivalence of php's NOT (!)
2493
+ function wppaIsEmpty( str ) {
2494
+
2495
+ if ( str == null ) return true;
2496
+ if ( typeof( str ) == 'undefined' ) return true;
2497
+ if ( str == '' ) return true;
2498
+ if ( str == false ) return true;
2499
+ if ( str == 0 ) return true;
2500
+
2501
+ return false;
2502
  }
js/wppa-tinymce-photo.js ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* wppa-tinymce-photo.js
2
+ * Pachkage: wp-photo-album-plus
3
+ *
4
+ *
5
+ * Version 6.7.08
6
+ *
7
+ */
8
+
9
+ // Add the wppa button to the mce editor
10
+ tinymce.PluginManager.add('wppaphoto', function(editor, url) {
11
+
12
+ function openWppaPhotoShortcodeGenerator() {
13
+ // triggers the thickbox
14
+ var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
15
+ W = W - 80;
16
+ H = jQuery(window).height();
17
+ H = H - 120;
18
+ tb_show( 'WPPA+ Insert photo', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=wppaphoto-form' );
19
+ }
20
+
21
+ editor.addButton('myphoto_button', {
22
+ image: wppaImageDirectory+'camera32.png',
23
+ tooltip: 'WPPA+ Insert photo',
24
+ onclick: openWppaPhotoShortcodeGenerator
25
+ });
26
+
27
+ });
28
+
29
+ // executes this when the DOM is ready
30
+ jQuery(function(){
31
+
32
+ // creates a form to be displayed everytime the button is clicked
33
+ var xmlhttp = wppaGetXmlHttp(); // located in wppa-admin-scripts.js
34
+
35
+ // wppa-ajax.php calls wppa_make_tinymce_dialog(); which is located in wppa-tinymce.php
36
+ var url = wppaAjaxUrl+'?action=wppa&wppa-action=tinymcephotodialog';
37
+
38
+ xmlhttp.open("GET",url,true);
39
+ xmlhttp.send();
40
+ xmlhttp.onreadystatechange=function() {
41
+ if (xmlhttp.readyState == 4 && xmlhttp.status!=404 ) {
42
+ var formtext = xmlhttp.responseText;
43
+
44
+ var form = jQuery(formtext);
45
+
46
+ var table = form.find('table');
47
+ form.appendTo('body').hide();
48
+
49
+ // handles the click event of the submit button
50
+ form.find('#wppaphoto-submit').click(function(){
51
+
52
+ // Get the shortcode from the preview/edit box
53
+ newShortcode = jQuery( '#wppaphoto-shortcode-preview' ).val();
54
+
55
+ // Filter
56
+ newShortcode = newShortcode.replace(/&quot;/g, '"');
57
+
58
+ // inserts the shortcode into the active editor
59
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, newShortcode);
60
+
61
+ // Switch back to own photos only
62
+ wppaMyPhotoSelection=true;
63
+ jQuery('#wppaphoto-allphoto-tr').hide();
64
+ jQuery('#wppaphoto-myphoto-tr').show();
65
+ jQuery('#wppaphoto-photo-preview').html('');
66
+
67
+ // closes Thickbox
68
+ tb_remove();
69
+ });
70
+ }
71
+ }
72
+ });
73
+
74
+ var wppaMyPhotoSelection = true;
75
+ function wppaPhotoEvaluate() {
76
+
77
+ // Assume shortcode complete
78
+ var shortcodeOk = true;
79
+ var shortcode = '[photo';
80
+ var myAll;
81
+
82
+ // Photo
83
+ if ( wppaMyPhotoSelection ) {
84
+ myAll = 'my';
85
+ }
86
+ else {
87
+ myAll = 'all';
88
+ }
89
+ photo = jQuery('#wppaphoto-'+myAll+'photo').val();
90
+
91
+ if ( ! wppaIsEmpty( photo ) ) {
92
+ id = photo.replace(/\//g,'');
93
+ id = id.split('.');
94
+ id = id[0];
95
+ jQuery('#wppaphoto-photo-preview-tr').show();
96
+ wppaTinyMceBasicPhotoPreview( photo );
97
+ shortcode += ' '+id;
98
+ jQuery('#wppaphoto-'+myAll+'photo').css('color', '#070');
99
+ }
100
+ else {
101
+ jQuery('#wppaphoto-'+myAll+'photo').css('color', '#700');
102
+ }
103
+
104
+ // Close
105
+ shortcode += ']';
106
+
107
+ // Display shortcode
108
+ shortcode = shortcode.replace(/"/g, '&quot;');
109
+ var html = '<input type="text" id="wppaphoto-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+shortcode+'" />';
110
+ jQuery( '#wppaphoto-shortcode-preview-container' ).html( html );
111
+
112
+ // Is shortcode complete?
113
+ shortcodeOk = ! wppaIsEmpty( photo );
114
+
115
+ // Display the right button
116
+ if ( shortcodeOk ) {
117
+ jQuery('#wppaphoto-submit').show();
118
+ jQuery('#wppaphoto-submit-notok').hide();
119
+ }
120
+ else {
121
+ jQuery('#wppaphoto-submit').hide();
122
+ jQuery('#wppaphoto-submit-notok').show();
123
+ }
124
+ }
125
+
126
+ function wppaTinyMceBasicPhotoPreview( id ) {
127
+
128
+ if ( id == '#potd' ) {
129
+ jQuery('#wppaphoto-photo-preview').html(wppaNoPreview); // No preview
130
+ }
131
+ else if ( id.indexOf('xxx') != -1 ) { // its a video
132
+ var idv = id.replace('xxx', '');
133
+ jQuery('#wppaphoto-photo-preview').html('<video preload="metadata" style="max-width:600px; max-height:150px; margin-top:3px;" controls>'+
134
+ '<source src="'+wppaPhotoDirectory+idv+'mp4" type="video/mp4">'+
135
+ '<source src="'+wppaPhotoDirectory+idv+'ogg" type="video/ogg">'+
136
+ '<source src="'+wppaPhotoDirectory+idv+'ogv" type="video/ogg">'+
137
+ '<source src="'+wppaPhotoDirectory+idv+'webm" type="video/webm">'+
138
+ '</video>');
139
+ }
140
+ else {
141
+ jQuery('#wppaphoto-photo-preview').html('<img src="'+wppaPhotoDirectory+id+'" style="max-width:400px; max-height:300px;" />');
142
+ }
143
+ }
144
+
145
+ function wppaDisplaySelectedFile(filetagid, displaytagid) {
146
+
147
+ var theFile = jQuery('#'+filetagid);
148
+ var result = theFile[0].files[0].name;
149
+
150
+ jQuery('#'+displaytagid).val('Upload '+result);
151
+ }
152
+
153
+ // Ajax upload script
154
+ jQuery(function() {
155
+
156
+ var options = {
157
+ beforeSend: function() {
158
+ jQuery("#progress").show();
159
+ jQuery("#bar").width('0%');
160
+ jQuery("#message").html("");
161
+ jQuery("#percent").html("");
162
+ },
163
+ uploadProgress: function(event, position, total, percentComplete) {
164
+ jQuery("#bar").width(percentComplete+'%');
165
+ if ( percentComplete < 95 ) {
166
+ jQuery("#percent").html(percentComplete+'%');
167
+ }
168
+ else {
169
+ jQuery("#percent").html(wppaTxtProcessing);
170
+ }
171
+ },
172
+ success: function() {
173
+ jQuery("#bar").width('100%');
174
+ jQuery("#percent").html(wppaTxtDone);
175
+ },
176
+ complete: function(response) {
177
+
178
+ var resparr = response.responseText.split( '||' );
179
+
180
+ // Non fatal error uploading?
181
+ if ( resparr.length == 1 ) {
182
+ jQuery("#message").html( '<span style="font-size: 10px;" >'+resparr[0]+'</span>' );
183
+ }
184
+ else {
185
+ jQuery( '#wppaphoto-myphoto' ).html( resparr[2] );
186
+ }
187
+ wppaPhotoEvaluate();
188
+
189
+ },
190
+ error: function() {
191
+ jQuery("#message").html( '<span style="color: red;" >'+wppaTxtErrUnable+'</span>' );
192
+ }
193
+ };
194
+
195
+ setTimeout(function(){jQuery("#wppa-uplform").ajaxForm(options)}, 1000);
196
+
197
+ });
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.7.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!!
@@ -1324,5 +1324,12 @@ function wppaDisplaySelectedFiles(id) {
1324
  jQuery('#'+id+'-display').val(result);
1325
  }
1326
 
 
 
 
 
 
 
 
1327
  // Say we're in
1328
  wppaConsoleLog( 'wppa.js version '+wppaJsVersion+' loaded.', 'force' );
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.7.08';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
1324
  jQuery('#'+id+'-display').val(result);
1325
  }
1326
 
1327
+ function wppaIsEmpty( str ) {
1328
+ if ( typeof( str ) == 'undefined' ) return true;
1329
+ if ( str == '' ) return true;
1330
+ if ( str == false ) return true;
1331
+ if ( str == 0 ) return true;
1332
+ }
1333
+
1334
  // Say we're in
1335
  wppaConsoleLog( 'wppa.js version '+wppaJsVersion+' loaded.', 'force' );
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3)}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(a.length>0)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){if(wppaAutoColumnWidth[p]){var a;if(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(t.length>1){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,s=o-1;e=parseInt((a+8)/o-8);for(var r=0;r<t.length;){switch(r%o){case 0:jQuery(t[r]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"left"})}r++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);var i={marginLeft:"0px",float:"left"};jQuery(".wppa-cover-box-mcr-"+p).css(i)}if(wppaThumbSpaceAuto){var n=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(n){var w=wppaMinThumbSpace,l=a-wppaThumbnailAreaDelta-7,u=parseInt(l/(n+w)),c=l-u*n,d=parseInt(.5+c/(u+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:d})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,m=1,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");y;)h=y*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",h),m++,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),wppaSearchBoxSelItems[p]>0&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%"))}}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var s=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:s})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaGetCurrentFullUrl(p,a){var e,t,o,s=document.location.href.split("?"),r="nil",i=0,n=!0;o=wppaShortQargs?"":"wppa-",s[1]&&(r=s[1].split("&"));var w=!1;if(e=s[0],"nil"!=r&&r.length>0)for(;i<r.length;)(t=r[i].split("="))[0]==o+"album"&&(w=!0),t[0]!=o+"photo"&&(e+=n?"?":"&",n=!1,e+=r[i]),i++;return w?(e+=n?"?":"&",e+=wppaUsePhotoNamesInUrls?o+"photo="+encodeURIComponent(_wppaNames[p][a]):o+"photo="+_wppaId[p][a]):""}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />")}function wppaTrimAlt(p){return void 0===p?"":p.length>13?p.substr(0,10)+"...":p}function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:10,center:t},s=new google.maps.Map(document.getElementById("map-canvas-"+p),o),r=new google.maps.Marker({position:t,map:s,title:""});google.maps.event.addListener(s,"center_changed",function(){window.setTimeout(function(){s.panTo(r.getPosition())},1e3)})}function wppaEncode(p){var a,e;if(void 0!==p){var t=(a=e=(a=e=(a=p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),o=0;for(e="";o<t.length;)e+=t[o],++o<t.length&&(e+="||PLUS||");return e}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:(a=a[1],a=a.split("."),a=a[0].replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""))}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",s="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");r=jQuery(".wppa-ss-albumcat-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");r=jQuery(".wppa-ss-albumtext-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");r=jQuery(".wppa-ss-phototag-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var r=jQuery(".wppa-ss-phototext-"+p);s="";var i;for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(s=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(s=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+s,document.location.href=n}}function wppaAjaxGetSsIptcList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaAjaxGetSsExifList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;e>6&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).removeAttr("checked"),jQuery(e[t]).removeAttr("disabled")):(jQuery(e[t]).attr("checked","checked"),jQuery(e[t]).attr("disabled","disabled")),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){if("checked"==jQuery(p).attr("checked"))for(var a=jQuery(".wppa-rootbox"),e=0;e<a.length;)jQuery(a[e]).attr("checked","checked"),e++}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}var wppaJsVersion="6.7.03",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule,wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaSlideWrap=!0,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),wppaFirstOccur=0,0==a){t=(e=document.location.href).split("&wppa-occur=");a=parseInt(t[1])}var e=document.location.href,t=e.split("&wppa-photo="),o=parseInt(t[1]);if(o>0){for(var s=0;s<_wppaId[a].length&&_wppaId[a][s]!=o;)s++;s<_wppaId[a].length&&_wppaGoto(a,s)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3)}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(a.length>0)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){if(wppaAutoColumnWidth[p]){var a;if(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(t.length>1){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,s=o-1;e=parseInt((a+8)/o-8);for(var r=0;r<t.length;){switch(r%o){case 0:jQuery(t[r]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"left"})}r++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);var i={marginLeft:"0px",float:"left"};jQuery(".wppa-cover-box-mcr-"+p).css(i)}if(wppaThumbSpaceAuto){var n=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(n){var w=wppaMinThumbSpace,l=a-wppaThumbnailAreaDelta-7,u=parseInt(l/(n+w)),c=l-u*n,d=parseInt(.5+c/(u+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:d})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,m=1,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");y;)h=y*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",h),m++,y=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),wppaSearchBoxSelItems[p]>0&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%"))}}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var s=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:s})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaGetCurrentFullUrl(p,a){var e,t,o,s=document.location.href.split("?"),r="nil",i=0,n=!0;o=wppaShortQargs?"":"wppa-",s[1]&&(r=s[1].split("&"));var w=!1;if(e=s[0],"nil"!=r&&r.length>0)for(;i<r.length;)(t=r[i].split("="))[0]==o+"album"&&(w=!0),t[0]!=o+"photo"&&(e+=n?"?":"&",n=!1,e+=r[i]),i++;return w?(e+=n?"?":"&",e+=wppaUsePhotoNamesInUrls?o+"photo="+encodeURIComponent(_wppaNames[p][a]):o+"photo="+_wppaId[p][a]):""}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />")}function wppaTrimAlt(p){return void 0===p?"":p.length>13?p.substr(0,10)+"...":p}function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:10,center:t},s=new google.maps.Map(document.getElementById("map-canvas-"+p),o),r=new google.maps.Marker({position:t,map:s,title:""});google.maps.event.addListener(s,"center_changed",function(){window.setTimeout(function(){s.panTo(r.getPosition())},1e3)})}function wppaEncode(p){var a,e;if(void 0!==p){var t=(a=e=(a=e=(a=p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),o=0;for(e="";o<t.length;)e+=t[o],++o<t.length&&(e+="||PLUS||");return e}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:(a=a[1],a=a.split("."),a=a[0].replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""),a=a.replace("/",""))}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",s="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");r=jQuery(".wppa-ss-albumcat-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");r=jQuery(".wppa-ss-albumtext-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");r=jQuery(".wppa-ss-phototag-"+p);s="";for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var r=jQuery(".wppa-ss-phototext-"+p);s="";var i;for(i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(s=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(s=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+s,document.location.href=n}}function wppaAjaxGetSsIptcList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaAjaxGetSsExifList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;e>6&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).removeAttr("checked"),jQuery(e[t]).removeAttr("disabled")):(jQuery(e[t]).attr("checked","checked"),jQuery(e[t]).attr("disabled","disabled")),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){if("checked"==jQuery(p).attr("checked"))for(var a=jQuery(".wppa-rootbox"),e=0;e<a.length;)jQuery(a[e]).attr("checked","checked"),e++}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return void 0===p||(""==p||(0==p||(0==p||void 0)))}var wppaJsVersion="6.7.08",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule,wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaSlideWrap=!0,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),wppaFirstOccur=0,0==a){t=(e=document.location.href).split("&wppa-occur=");a=parseInt(t[1])}var e=document.location.href,t=e.split("&wppa-photo="),o=parseInt(t[1]);if(o>0){for(var s=0;s<_wppaId[a].length&&_wppaId[a][s]!=o;)s++;s<_wppaId[a].length&&_wppaGoto(a,s)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 6.7.07
6
- Stable tag: 6.7.06
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -127,6 +127,21 @@ If this happens, make sure (ask your hosting provider) that you have all the rig
127
 
128
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  = 6.7.07 =
131
 
132
  = Bug Fixes =
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 6.7.08
6
+ Stable tag: 6.7.07
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
127
 
128
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
130
+ = 6.7.08 =
131
+
132
+ = Bug Fixes =
133
+
134
+ * Fixed a problem when using imagemagick and the upload file contains spaces in the name.
135
+
136
+ = New Features =
137
+
138
+ * Added shortcode generator for shortcode [photo]. Including upload new photo. Requires enabling the use of shortcode [photo] in Table IX-L1.
139
+
140
+ = Other Changes =
141
+
142
+ * Added 'Albums only' to Table IX-E12: Search results display.
143
+ * Changed defaults for max albums to 500 in Table IX-B6.3 and Table VII-B13. Note: The value in Table VII-B13 should be <= Table IX-B6.3.
144
+
145
  = 6.7.07 =
146
 
147
  = 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.7.06
7
  *
8
  */
9
 
@@ -95,6 +95,7 @@ global $wppa_api_version;
95
  wp_enqueue_script( 'jquery' );
96
  wp_enqueue_script( 'jquery-ui-sortable' );
97
  wp_enqueue_script( 'jquery-ui-dialog' );
 
98
  wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
99
  }
100
 
@@ -169,6 +170,7 @@ function wppa_page_help() {
169
  // General purpose admin functions
170
  require_once 'wppa-admin-functions.php';
171
  require_once 'wppa-tinymce-shortcodes.php';
 
172
 
173
  /* This is for the changelog text when an update is available */
174
  global $pagenow;
@@ -214,7 +216,7 @@ if ( true ) {
214
  }
215
  function wppa_activity(){
216
  if ( function_exists( 'wp_add_dashboard_widget' ) ) {
217
- wp_add_dashboard_widget( 'wppa-activity', __( 'Recent WPPA activity', 'wp-photo-album-plus' ), 'wppa_show_activity_feed' ); //, $control_callback = null, $callback_args = null )
218
  }
219
  }
220
  function wppa_show_activity_feed() {
@@ -227,10 +229,10 @@ global $wpdb;
227
  echo
228
  '<table>';
229
  foreach( $photos as $photo ) {
230
- echo
231
  '<tr>' .
232
  '<td>' .
233
- '<a href="' . wppa_get_photo_url( $photo['id'] ) . '" target="_blank" >' .
234
  '<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
235
  '</a>' .
236
  '</td>' .
@@ -243,26 +245,26 @@ global $wpdb;
243
  $usr = $photo['owner'];
244
  }
245
  echo
246
- sprintf( __( 'by %s in album %s', 'wp-photo-album-plus' ),
247
- '<b>' . $usr . '</b>',
248
- '<b>' . wppa_get_album_name( $photo['album'] ) . '</b> (' . $photo['album'] . ')'
249
  ) .
250
  '<br />' .
251
  wppa_local_date( '', $photo['timestamp'] ) .
252
  '</td>' .
253
- '</tr />';
254
  }
255
  echo
256
  '</table>';
257
  }
258
  else {
259
- echo
260
  '<p>' .
261
  __( 'There are no recently uploaded photos', 'wp-photo-album-plus' ) .
262
  '</p>';
263
  }
264
  echo '<br />';
265
-
266
  // Recent comments
267
  echo '<h3>' . __( 'Recent comments on photos', 'wp-photo-album-plus' ) . '</h3>';
268
  $comments = $wpdb->get_results( "SELECT * FROM `" . WPPA_COMMENTS . "` ORDER BY `timestamp` DESC LIMIT 5", ARRAY_A );
@@ -274,7 +276,7 @@ global $wpdb;
274
  echo
275
  '<tr>' .
276
  '<td>' .
277
- '<a href="' . wppa_get_photo_url( $photo['id'] ) . '" target="_blank" >' .
278
  '<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
279
  '</a>' .
280
  '</td>' .
@@ -286,7 +288,7 @@ global $wpdb;
286
  else {
287
  $usr = $comment['user'];
288
  }
289
- echo
290
  '<i>' . $comment['comment'] . '</i>' .
291
  '<br />' .
292
  sprintf( __( 'by %s', 'wp-photo-album-plus' ),
@@ -300,7 +302,7 @@ global $wpdb;
300
  '</table>';
301
  }
302
  else {
303
- echo
304
  '<p>' .
305
  __( 'There are no recent comments on photos', 'wp-photo-album-plus' ) .
306
  '</p>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 6.7.08
7
  *
8
  */
9
 
95
  wp_enqueue_script( 'jquery' );
96
  wp_enqueue_script( 'jquery-ui-sortable' );
97
  wp_enqueue_script( 'jquery-ui-dialog' );
98
+ wp_enqueue_script( 'jquery-form' );
99
  wp_enqueue_script( 'wppa-utils', WPPA_URL . '/js/wppa-utils.js', array(), $wppa_api_version );
100
  }
101
 
170
  // General purpose admin functions
171
  require_once 'wppa-admin-functions.php';
172
  require_once 'wppa-tinymce-shortcodes.php';
173
+ require_once 'wppa-tinymce-photo.php';
174
 
175
  /* This is for the changelog text when an update is available */
176
  global $pagenow;
216
  }
217
  function wppa_activity(){
218
  if ( function_exists( 'wp_add_dashboard_widget' ) ) {
219
+ wp_add_dashboard_widget( 'wppa-activity', __( 'Recent WPPA activity', 'wp-photo-album-plus' ), 'wppa_show_activity_feed' ); //, $control_callback = null, $callback_args = null )
220
  }
221
  }
222
  function wppa_show_activity_feed() {
229
  echo
230
  '<table>';
231
  foreach( $photos as $photo ) {
232
+ echo
233
  '<tr>' .
234
  '<td>' .
235
+ '<a href="' . wppa_get_photo_url( $photo['id'] ) . '" target="_blank" >' .
236
  '<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
237
  '</a>' .
238
  '</td>' .
245
  $usr = $photo['owner'];
246
  }
247
  echo
248
+ sprintf( __( 'by %s in album %s', 'wp-photo-album-plus' ),
249
+ '<b>' . $usr . '</b>',
250
+ '<b>' . wppa_get_album_name( $photo['album'] ) . '</b> (' . $photo['album'] . ')'
251
  ) .
252
  '<br />' .
253
  wppa_local_date( '', $photo['timestamp'] ) .
254
  '</td>' .
255
+ '</tr />';
256
  }
257
  echo
258
  '</table>';
259
  }
260
  else {
261
+ echo
262
  '<p>' .
263
  __( 'There are no recently uploaded photos', 'wp-photo-album-plus' ) .
264
  '</p>';
265
  }
266
  echo '<br />';
267
+
268
  // Recent comments
269
  echo '<h3>' . __( 'Recent comments on photos', 'wp-photo-album-plus' ) . '</h3>';
270
  $comments = $wpdb->get_results( "SELECT * FROM `" . WPPA_COMMENTS . "` ORDER BY `timestamp` DESC LIMIT 5", ARRAY_A );
276
  echo
277
  '<tr>' .
278
  '<td>' .
279
+ '<a href="' . wppa_get_photo_url( $photo['id'] ) . '" target="_blank" >' .
280
  '<img src="' . wppa_get_thumb_url( $photo['id'] ) . '" style="max-width:50px;max-height:50px;" /> ' .
281
  '</a>' .
282
  '</td>' .
288
  else {
289
  $usr = $comment['user'];
290
  }
291
+ echo
292
  '<i>' . $comment['comment'] . '</i>' .
293
  '<br />' .
294
  sprintf( __( 'by %s', 'wp-photo-album-plus' ),
302
  '</table>';
303
  }
304
  else {
305
+ echo
306
  '<p>' .
307
  __( 'There are no recent comments on photos', 'wp-photo-album-plus' ) .
308
  '</p>';
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.7.07
6
  *
7
  */
8
 
@@ -661,6 +661,12 @@ global $wppa_log_file;
661
  wppa_exit();
662
  break;
663
 
 
 
 
 
 
 
664
  case 'bumpviewcount':
665
  $nonce = $_REQUEST['wppa-nonce'];
666
  if ( wp_verify_nonce( $nonce, 'wppa-check' ) ) {
@@ -3204,6 +3210,11 @@ global $wppa_log_file;
3204
  }
3205
  wppa_user_upload();
3206
  echo wppa( 'out' );
 
 
 
 
 
3207
  wppa_exit();
3208
  break;
3209
 
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.7.08
6
  *
7
  */
8
 
661
  wppa_exit();
662
  break;
663
 
664
+ case 'tinymcephotodialog':
665
+ $result = wppa_make_tinymce_photo_dialog();
666
+ echo $result;
667
+ wppa_exit();
668
+ break;
669
+
670
  case 'bumpviewcount':
671
  $nonce = $_REQUEST['wppa-nonce'];
672
  if ( wp_verify_nonce( $nonce, 'wppa-check' ) ) {
3210
  }
3211
  wppa_user_upload();
3212
  echo wppa( 'out' );
3213
+ global $wppa_upload_succes_id;
3214
+ if ( isset( $_GET['fromtinymce'] ) && $wppa_upload_succes_id ) {
3215
+ echo '||' . $wppa_upload_succes_id . '||';
3216
+ echo wppa_get_myphotos_selection_body_for_tinymce( $wppa_upload_succes_id );
3217
+ }
3218
  wppa_exit();
3219
  break;
3220
 
wppa-common-functions.php CHANGED
@@ -852,6 +852,9 @@ global $wppa;
852
  $wppa['is_slide'] = '1';
853
  $wppa['is_slideonly'] = '1';
854
  break;
 
 
 
855
  default:
856
  break;
857
  }
852
  $wppa['is_slide'] = '1';
853
  $wppa['is_slideonly'] = '1';
854
  break;
855
+ case 'albums':
856
+ $wppa['albums_only'] = true;
857
+ break;
858
  default:
859
  break;
860
  }
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.7.07
7
  *
8
  */
9
 
@@ -4255,6 +4255,7 @@ function wppa_user_upload() {
4255
  global $wpdb;
4256
  static $done;
4257
  global $wppa_alert;
 
4258
 
4259
  wppa_dbg_msg( 'Usr_upl entered' );
4260
 
@@ -4380,6 +4381,9 @@ global $wppa_alert;
4380
  $uploaded_ids[] = $iret;
4381
  $done++;
4382
  wppa_set_last_album( $alb );
 
 
 
4383
  }
4384
  else $fail++;
4385
  }
@@ -4393,6 +4397,9 @@ global $wppa_alert;
4393
  $f['type'] = $file['type'][$i];
4394
  $f['size'] = $file['size'][$i];
4395
  $iret = wppa_do_frontend_file_upload( $f, $alb );
 
 
 
4396
  if ( $iret ) {
4397
  $uploaded_ids[] = $iret;
4398
  $done++;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.7.08
7
  *
8
  */
9
 
4255
  global $wpdb;
4256
  static $done;
4257
  global $wppa_alert;
4258
+ global $wppa_upload_succes_id;
4259
 
4260
  wppa_dbg_msg( 'Usr_upl entered' );
4261
 
4381
  $uploaded_ids[] = $iret;
4382
  $done++;
4383
  wppa_set_last_album( $alb );
4384
+
4385
+ // Report phto id if from tinymce photo shortcode generator upload
4386
+ $wppa_upload_succes_id = $iret;
4387
  }
4388
  else $fail++;
4389
  }
4397
  $f['type'] = $file['type'][$i];
4398
  $f['size'] = $file['size'][$i];
4399
  $iret = wppa_do_frontend_file_upload( $f, $alb );
4400
+
4401
+ // Report phto id if from tinymce photo shortcode generator upload
4402
+ $wppa_upload_succes_id = $iret;
4403
  if ( $iret ) {
4404
  $uploaded_ids[] = $iret;
4405
  $done++;
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 6.7.01
6
  *
7
  */
8
 
@@ -36,7 +36,7 @@ function wppa_make_o1_source( $id ) {
36
 
37
  // ImageMagick
38
  if ( wppa_opt( 'image_magick' ) ) {
39
- wppa_image_magick( 'convert ' . $src_path . ' -auto-orient ' . $dst_path );
40
  }
41
 
42
  // Classic
@@ -192,7 +192,7 @@ global $wpdb;
192
  $quality = '-quality ' . $q;
193
  }
194
 
195
- wppa_image_magick( 'convert ' . $file . ' ' . $quality . ' -resize ' . ( $thumb['stereo'] ? 2 * $max_width : $max_width ) . 'x' . $max_height . ' ' . $newimage );
196
  }
197
 
198
  // Classic GD
@@ -460,7 +460,7 @@ function wppa_create_thumbnail( $id, $use_source = true ) {
460
 
461
  // Image Magick?
462
  if ( wppa_opt( 'image_magick' ) && $type == 'none' ) {
463
- wppa_image_magick( 'convert ' . $file . ' -thumbnail ' . $max_side . 'x' . $max_side . ' ' . $thumbpath );
464
  }
465
 
466
  // Classic GD
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 6.7.08
6
  *
7
  */
8
 
36
 
37
  // ImageMagick
38
  if ( wppa_opt( 'image_magick' ) ) {
39
+ wppa_image_magick( 'convert "' . $src_path . '" -auto-orient "' . $dst_path . '"' );
40
  }
41
 
42
  // Classic
192
  $quality = '-quality ' . $q;
193
  }
194
 
195
+ wppa_image_magick( 'convert "' . $file . '" ' . $quality . ' -resize ' . ( $thumb['stereo'] ? 2 * $max_width : $max_width ) . 'x' . $max_height . ' ' . $newimage );
196
  }
197
 
198
  // Classic GD
460
 
461
  // Image Magick?
462
  if ( wppa_opt( 'image_magick' ) && $type == 'none' ) {
463
+ wppa_image_magick( 'convert "' . $file . '" -thumbnail ' . $max_side . 'x' . $max_side . ' ' . $thumbpath );
464
  }
465
 
466
  // Classic GD
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.7.04
7
  *
8
  */
9
 
@@ -341,7 +341,17 @@ global $wp_version;
341
  wppa_opt( 'tf_height_alt') < wppa_opt( 'thumbsize_alt' ) ) ) {
342
  wppa_warning_message( __( 'A thumbframe width or height should not be smaller than a thumbnail size. Please correct the corresponding setting(s) in Table I-C' , 'wp-photo-album-plus') );
343
  }
344
-
 
 
 
 
 
 
 
 
 
 
345
  ?>
346
  <!--<br /><a href="javascript:window.print();"><?php //_e('Print settings') ?></a><br />-->
347
  <a style="cursor:pointer;" id="wppa-legon" onclick="jQuery('#wppa-legenda').css('display', ''); jQuery('#wppa-legon').css('display', 'none'); return false;" ><?php _e('Show legenda', 'wp-photo-album-plus') ?></a>
@@ -6419,7 +6429,7 @@ global $wp_version;
6419
  $values = array( '0', '3600', '86400', '604800', '2592000', '31449600');
6420
 
6421
  $roles = $wp_roles->roles;
6422
- $roles['loggedout'] = '';
6423
  $roles['loggedout']['name'] = __('Logged out', 'wp-photo-album-plus');
6424
  unset ( $roles['administrator'] );
6425
  foreach (array_keys($roles) as $role) {
@@ -8945,8 +8955,12 @@ global $wp_version;
8945
  $desc = __('Select the way the search results should be displayed.', 'wp-photo-album-plus');
8946
  $help = esc_js(__('If you select anything different from "Albums and thumbnails", "Photos only" is assumed (Table IX-E6).', 'wp-photo-album-plus'));
8947
  $slug = 'wppa_search_display_type';
8948
- $opts = array( __('Albums and thumbnails', 'wp-photo-album-plus'), __('Slideshow', 'wp-photo-album-plus'), __('Slideonly slideshow', 'wp-photo-album-plus') );
8949
- $vals = array( 'content', 'slide', 'slideonly' );
 
 
 
 
8950
  $html = wppa_select( $slug, $opts, $vals);
8951
  $clas = '';
8952
  $tags = 'system,search,layout';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.7.08
7
  *
8
  */
9
 
341
  wppa_opt( 'tf_height_alt') < wppa_opt( 'thumbsize_alt' ) ) ) {
342
  wppa_warning_message( __( 'A thumbframe width or height should not be smaller than a thumbnail size. Please correct the corresponding setting(s) in Table I-C' , 'wp-photo-album-plus') );
343
  }
344
+
345
+ // Check for 'many' albums
346
+ if ( wppa_opt( 'photo_admin_max_albums' ) ) { // Not OFF
347
+ $abs = $wpdb->get_var( "SELECT COUNT(*) FROM `" . WPPA_ALBUMS . "` " );
348
+ if ( wppa_opt( 'photo_admin_max_albums' ) < $abs ) {
349
+ wppa_warning_message( __( 'This system contains more albums than the maximum set in Table IX-B6.3.', 'wp-photo-album-plus' ) . ' ' .
350
+ __( 'No problem, but some widgets may not work and some album selectionboxes will revert to a simple input field asking for an album id.', 'wp-photo-album-plus' ) . ' ' .
351
+ __( 'If you do not have pageload performance problems, you may increase the number in Table IX-B6.3.', 'wp-photo-album-plus' ) . ' ' .
352
+ __( 'If there are many empty albums, you can simply remove them by running the maintenance procedure in Table VIII-B7.', 'wp-photo-album-plus' ) );
353
+ }
354
+ }
355
  ?>
356
  <!--<br /><a href="javascript:window.print();"><?php //_e('Print settings') ?></a><br />-->
357
  <a style="cursor:pointer;" id="wppa-legon" onclick="jQuery('#wppa-legenda').css('display', ''); jQuery('#wppa-legon').css('display', 'none'); return false;" ><?php _e('Show legenda', 'wp-photo-album-plus') ?></a>
6429
  $values = array( '0', '3600', '86400', '604800', '2592000', '31449600');
6430
 
6431
  $roles = $wp_roles->roles;
6432
+ $roles['loggedout'] = array();
6433
  $roles['loggedout']['name'] = __('Logged out', 'wp-photo-album-plus');
6434
  unset ( $roles['administrator'] );
6435
  foreach (array_keys($roles) as $role) {
8955
  $desc = __('Select the way the search results should be displayed.', 'wp-photo-album-plus');
8956
  $help = esc_js(__('If you select anything different from "Albums and thumbnails", "Photos only" is assumed (Table IX-E6).', 'wp-photo-album-plus'));
8957
  $slug = 'wppa_search_display_type';
8958
+ $opts = array( __('Albums and thumbnails', 'wp-photo-album-plus'),
8959
+ __('Slideshow', 'wp-photo-album-plus'),
8960
+ __('Slideonly slideshow', 'wp-photo-album-plus'),
8961
+ __('Albums only', 'wp-photo-album-plus')
8962
+ );
8963
+ $vals = array( 'content', 'slide', 'slideonly', 'albums' );
8964
  $html = wppa_select( $slug, $opts, $vals);
8965
  $clas = '';
8966
  $tags = 'system,search,layout';
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.7.04
7
  *
8
  */
9
 
@@ -1441,7 +1441,7 @@ Hide Camera info
1441
  'wppa_void_dups' => 'no',
1442
  'wppa_home_after_upload' => 'no',
1443
  'wppa_fe_alert' => 'all',
1444
- 'wppa_fe_upload_max_albums' => '200', // VII-B13
1445
 
1446
  'wppa_fe_create_ntfy' => '', // VII-B1.3
1447
 
@@ -1561,7 +1561,7 @@ Hide Camera info
1561
  'wppa_alt_type' => 'fullname',
1562
  'wppa_album_admin_pagesize' => '0',
1563
  'wppa_photo_admin_pagesize' => '20',
1564
- 'wppa_photo_admin_max_albums' => '200',
1565
  'wppa_comment_admin_pagesize' => '10',
1566
  'wppa_jpeg_quality' => '95',
1567
  'wppa_geo_edit' => 'no',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.7.08
7
  *
8
  */
9
 
1441
  'wppa_void_dups' => 'no',
1442
  'wppa_home_after_upload' => 'no',
1443
  'wppa_fe_alert' => 'all',
1444
+ 'wppa_fe_upload_max_albums' => '500', // VII-B13
1445
 
1446
  'wppa_fe_create_ntfy' => '', // VII-B1.3
1447
 
1561
  'wppa_alt_type' => 'fullname',
1562
  'wppa_album_admin_pagesize' => '0',
1563
  'wppa_photo_admin_pagesize' => '20',
1564
+ 'wppa_photo_admin_max_albums' => '500',
1565
  'wppa_comment_admin_pagesize' => '10',
1566
  'wppa_jpeg_quality' => '95',
1567
  'wppa_geo_edit' => 'no',
wppa-tinymce-photo.php ADDED
@@ -0,0 +1,415 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* wppa-tinymce-photo.php
3
+ * Pachkage: wp-photo-album-plus
4
+ *
5
+ * Version 6.7.08
6
+ *
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) )
10
+ die( "Can't load this file directly" );
11
+
12
+ class wppaPhoto
13
+ {
14
+ function __construct() {
15
+ add_action( 'init', array( $this, 'action_admin_init' ) ); // 'admin_init'
16
+ }
17
+
18
+ function action_admin_init() {
19
+ // only hook up these filters if we're in the admin panel, and the current user has permission
20
+ // to edit posts or pages, and the feature is enabled
21
+ // Only activate if the [photo] shortcode is enabled
22
+ if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
23
+ if ( wppa_user_is( 'administrator' ) || ( wppa_switch( 'enable_generator' ) && ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) ) {
24
+ add_filter( 'mce_buttons', array( $this, 'filter_mce_button' ) );
25
+ add_filter( 'mce_external_plugins', array( $this, 'filter_mce_plugin' ) );
26
+ }
27
+ }
28
+ }
29
+
30
+ function filter_mce_button( $buttons ) {
31
+ // add a separation before our button.
32
+ array_push( $buttons, ' ', 'myphoto_button' );
33
+ return $buttons;
34
+ }
35
+
36
+ function filter_mce_plugin( $plugins ) {
37
+ // this plugin file will work the magic of our button
38
+ $file = 'js/wppa-tinymce-photo.js';
39
+ $plugins['wppaphoto'] = plugin_dir_url( __FILE__ ) . $file;
40
+ return $plugins;
41
+ }
42
+
43
+ }
44
+
45
+ $wppaphoto = new wppaPhoto();
46
+
47
+ add_action('admin_head', 'wppa_inject_2_js');
48
+
49
+ function wppa_inject_2_js() {
50
+ global $wppa_api_version;
51
+
52
+ // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
53
+ echo('<script type="text/javascript">'."\n");
54
+ echo('/* <![CDATA[ */'."\n");
55
+ echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
56
+ echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
57
+ echo("\t".'wppaPhotoDirectory = "'.WPPA_UPLOAD_URL.'/";'."\n");
58
+ echo("\t".'wppaThumbDirectory = "'.WPPA_UPLOAD_URL.'/thumbs/";'."\n");
59
+ echo("\t".'wppaTempDirectory = "'.WPPA_UPLOAD_URL.'/temp/";'."\n");
60
+ echo("\t".'wppaFontDirectory = "'.WPPA_UPLOAD_URL.'/fonts/";'."\n");
61
+ echo("\t".'wppaNoPreview = "'.__('No Preview available', 'wp-photo-album-plus').'";'."\n");
62
+ echo("\t".'wppaVersion = "'.$wppa_api_version.'";'."\n");
63
+ echo("\t".'wppaSiteUrl = "'.site_url().'";'."\n");
64
+ echo("\t".'wppaWppaUrl = "'.WPPA_URL.'";'."\n");
65
+ echo("\t".'wppaIncludeUrl = "'.trim(includes_url(), '/').'";'."\n");
66
+ echo("\t".'wppaUIERR = "'.__('Unimplemented virtual album', 'wp-photo-album-plus').'";');
67
+ echo("\t".'wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus').'";');
68
+ echo("\t".'wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'";');
69
+ echo("\t".'wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'";');
70
+ // echo("\t".'wppaTxt = "'.__(, 'wp-photo-album-plus').'";');
71
+ // echo("\t".'wppaTxt = "'.__(, 'wp-photo-album-plus').'";');
72
+ // echo("\t".'wppaTxt = "'.__(, 'wp-photo-album-plus').'";');
73
+ echo("/* ]]> */\n");
74
+ echo("</script>\n");
75
+ }
76
+
77
+ function wppa_make_tinymce_photo_dialog() {
78
+ global $wpdb;
79
+
80
+ // Prepare albuminfo
81
+ $albums = $wpdb->get_results( "SELECT `id`, `name` " .
82
+ "FROM `" . WPPA_ALBUMS . "` " .
83
+ "WHERE `owner` = '" . wppa_get_user() . "' " .
84
+ "OR `owner` = '--- public ---' " .
85
+ "ORDER BY `name` ",
86
+ ARRAY_A );
87
+
88
+ // Make the html
89
+ // Open wrapper
90
+ $result =
91
+ '<div id="wppaphoto-form">' .
92
+ '<style>
93
+ #TB_ajaxContent {
94
+ box-sizing:border-box; width:100% !important;
95
+ }
96
+ .wppa-bar {
97
+ background-color: #7f7;
98
+ width:0%;
99
+ height:18px;
100
+ border-radius: 3px;
101
+ line-height: 18px;
102
+ margin: 0;
103
+ }
104
+ .wppa-percent {
105
+ position:relative;
106
+ display:inline-block;
107
+ top:-19px;
108
+ font-size: 12px;
109
+ line-height: 18px;
110
+ margin: 0;
111
+ }
112
+ .wppa-message {
113
+ clear: both;
114
+ }
115
+ #wppaphoto-table tr, #wppaphoto-table th, #wppaphoto-table td {
116
+ padding: 2px; 0;
117
+ }
118
+ </style>' .
119
+
120
+ // Open table
121
+ '
122
+ <table id="wppaphoto-table" class="form-table" >' .
123
+ '<tbody>' .
124
+
125
+ // My photos selection
126
+ '
127
+ <tr id="wppaphoto-myphoto-tr" style="" >' .
128
+ '<th><label for="wppaphoto-myphoto" class="wppaphoto-myphoto" >'.__('My Photo to be used', 'wp-photo-album-plus').':</label></th>'.
129
+ '<td>'.
130
+ '<select id="wppaphoto-myphoto" name="photo" class="wppaphoto-myphoto" onchange="wppaPhotoEvaluate()" >' .
131
+ wppa_get_myphotos_selection_body_for_tinymce() .
132
+ '</select>'.
133
+ '<input' .
134
+ ' type="button"' .
135
+ ' value="' . esc_attr( __( 'All photos', 'wp-photo-album-plus' ) ) . '"' .
136
+ ' onclick="jQuery(\'#wppaphoto-myphoto-tr\').hide();jQuery(\'#wppaphoto-allphoto-tr\').show();wppaMyPhotoSelection=false;jQuery(\'#wppaphoto-photo-preview\').html(\'\');wppaPhotoEvaluate();"' .
137
+ ' />' .
138
+ '<br />'.
139
+ '<small style="" class="wppamyphoto-photo" >'.
140
+ __('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
141
+ __('You can select one of your photos from a maximum of 100 most recently added', 'wp-photo-album-plus').'<br />'.
142
+ '</small>'.
143
+ '</td>'.
144
+ '</tr>' .
145
+
146
+ // Photo selection max 100 of all photos
147
+ '
148
+ <tr id="wppaphoto-allphoto-tr" style="display:none;" >'.
149
+ '<th><label for="wppaphoto-allphoto" class="wppaphoto-allphoto" >'.__('The Photo to be used', 'wp-photo-album-plus').':</label></th>'.
150
+ '<td>'.
151
+ '<select id="wppaphoto-allphoto" name="photo" class="wppaphoto-allphoto" onchange="wppaPhotoEvaluate()" >' .
152
+ wppa_get_allphotos_selection_body_for_tinymce() .
153
+ '</select>' .
154
+ '<br />' .
155
+ '<small style="" class="wppaphoto-allphoto" >'.
156
+ __('Specify the photo to be used', 'wp-photo-album-plus').'<br />'.
157
+ __('You can select from a maximum of 100 most recently added photos', 'wp-photo-album-plus').'<br />'.
158
+ '</small>'.
159
+ '</td>'.
160
+ '</tr>'.
161
+
162
+ // Photo preview
163
+ '
164
+ <tr id="wppaphoto-photo-preview-tr" style="" >'.
165
+ '<th>' .
166
+ __( 'Preview image', 'wp-photo-album-plus').':' .
167
+ '</th>'.
168
+ '<td id="wppaphoto-photo-preview" style="text-align:center;" >' .
169
+ '</td>' .
170
+ '</tr>' .
171
+
172
+ // Upload new photo dialog
173
+ ( count( $albums ) > 0 ?
174
+ '
175
+ <tr>' .
176
+ '<th>' .
177
+ '<a' .
178
+ ' style="cursor:pointer;"' .
179
+ ' onclick="jQuery(\'#upload-td\').show();jQuery( \'#wppa-user-upload\' ).click();"' .
180
+ ' >' .
181
+ __( 'Upload new photo', 'wp-photo-album-plus' ) . ':' .
182
+ '</a>' .
183
+ '</th>'.
184
+ '<td id="upload-td" style="display:none;" >' .
185
+
186
+ // Open form
187
+ '<form' .
188
+ ' id="wppa-uplform"' .
189
+ ' action="' . WPPA_URL . '/wppa-ajax-front.php?action=wppa&amp;wppa-action=do-fe-upload&amp;fromtinymce=1"' .
190
+ ' method="post"' .
191
+ ' enctype="multipart/form-data"' .
192
+ ' >' .
193
+ wppa_nonce_field( 'wppa-check' , 'wppa-nonce', false, false ) .
194
+
195
+ // Single album
196
+ ( ( count( $albums ) == 1 ) ?
197
+
198
+ '<input' .
199
+ ' type="hidden"' .
200
+ ' id="wppa-upload-album"' .
201
+ ' name="wppa-upload-album"' .
202
+ ' value="' . $albums[0]['id'] . '"' .
203
+ ' />' .
204
+
205
+ __( 'Upload to album', 'wp-photo-album-plus' ) . ': <b>' . wppa_get_album_name( $albums[0]['id'] ) . '</b>' :
206
+
207
+
208
+ // Multiple albums
209
+ __( 'Upload to album', 'wp-photo-album-plus' ) . ':' .
210
+ wppa_album_select_a( array( 'tagid' => 'wppa-upload-album',
211
+ 'tagname' => 'wppa-upload-album',
212
+ 'tagopen' => '<select' .
213
+ ' id="wppa-upload-album"' .
214
+ ' name="wppa-upload-album"' .
215
+ ' style="max-width:300px;"' .
216
+ ' >' ,
217
+ 'addpleaseselect' => true,
218
+ 'checkupload' => true,
219
+ 'checkowner' => true,
220
+
221
+ ) ) ) .
222
+
223
+ // The (hidden) functional button
224
+ '
225
+ <input' .
226
+ ' type="file"' .
227
+ ' style="' .
228
+ 'display:none;' .
229
+ '"' .
230
+ ' id="wppa-user-upload"' .
231
+ ' name="wppa-user-upload"' .
232
+ ' onchange="jQuery( \'#wppa-user-upload-submit\' ).css( \'display\', \'block\' );wppaDisplaySelectedFile(\'wppa-user-upload\', \'wppa-user-upload-submit\');"' .
233
+ ' />' .
234
+
235
+ // The upload submit button
236
+ '
237
+ <input' .
238
+ ' type="submit"' .
239
+ ' id="wppa-user-upload-submit"' .
240
+ ' onclick="if ( document.getElementById( \'wppa-upload-album\' ).value == 0 )' .
241
+ ' {alert( \''.esc_js( __( 'Please select an album and try again', 'wp-photo-album-plus' ) ).'\' );return false;}"' .
242
+ ' style="display:none;margin: 6px 0;"' .
243
+ ' class="wppa-user-upload-submit"' .
244
+ ' name="wppa-user-upload-submit"' .
245
+ ' value=""' .
246
+ ' />' .
247
+
248
+ // The progression bar
249
+ '
250
+ <div' .
251
+ ' id="progress"' .
252
+ ' class="wppa-progress "' .
253
+ ' style="clear:both;width:70%;border-color:#777;height:18px;border:1px solid;padding:1px;border-radius:3px;line-height: 18px;text-align: center;"' .
254
+ ' >' .
255
+ '<div id="bar" class="wppa-bar" ></div>' .
256
+ '<div id="percent" class="wppa-percent" >0%</div >' .
257
+ '</div>' .
258
+ '<div id="message" class="wppa-message" ></div>' .
259
+
260
+
261
+ // Form complete
262
+ '</form>' .
263
+ '</td>' .
264
+ '</tr>' : '' ) .
265
+
266
+ // Shortcode preview
267
+ '
268
+ <tr>' .
269
+ '<th>' .
270
+ __( 'Shortcode', 'wp-photo-album-plus' ) . ':' .
271
+ '</th>' .
272
+ '<td id="wppaphoto-shortcode-preview-container" >' .
273
+ '<input type="text" id="wppaphoto-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="[photo]" />' .
274
+ '</td>' .
275
+ '</tr>' .
276
+
277
+ '</tbody>' .
278
+
279
+ '</table>' .
280
+
281
+ // Insert shortcode button
282
+ '
283
+ <p class="submit">'.
284
+ '<input type="button" id="wppaphoto-submit" class="button-primary" value="'.__( 'Insert Photo', 'wp-photo-album-plus').'" name="submit" />&nbsp;'.
285
+ '<input type="button" id="wppaphoto-submit-notok" class="button-secundary" value="'.__( 'Insert Photo', 'wp-photo-album-plus').'" onclick="alert(\''.esc_js(__('Please select a photo', 'wp-photo-album-plus')).'\')" />&nbsp;'.
286
+ '</p>' .
287
+
288
+ // Initial evaluate
289
+ '<script type="text/javascript" >wppaPhotoEvaluate()</script>' .
290
+
291
+ // Close main wrapper
292
+ '
293
+ </div>';
294
+
295
+ return $result;
296
+ }
297
+
298
+ // The my photos selection box body
299
+ function wppa_get_myphotos_selection_body_for_tinymce( $selected = 0 ) {
300
+ global $wpdb;
301
+
302
+ // Init
303
+ $result = '';
304
+
305
+ // Prepare photoinfo
306
+ $my_photos = $wpdb->get_results( "SELECT `id`, `name`, `album`, `ext` " .
307
+ "FROM `" . WPPA_PHOTOS . "` " .
308
+ "WHERE `owner` = '" . wppa_get_user() . "' " .
309
+ "ORDER BY `timestamp` DESC LIMIT 100",
310
+ ARRAY_A );
311
+
312
+ if ( $my_photos ) {
313
+
314
+ // Please select
315
+ $result .= '<option' .
316
+ ' value=""' .
317
+ ' disabled="disabled"' .
318
+ ( $selected ? '' : ' selected="selected"' ) .
319
+ ' style="color:#700"' .
320
+ ' >' .
321
+ '-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
322
+ '</option>';
323
+
324
+ // Most recent 100 photos of this owner
325
+ foreach ( $my_photos as $photo ) {
326
+
327
+ // Find name
328
+ $name = stripslashes( __( $photo['name'] ) );
329
+ if ( strlen( $name ) > '50' ) $name = substr( $name, '0', '50' ) . '...';
330
+
331
+ // Make the html
332
+ if ( get_option( 'wppa_file_system' ) == 'flat' ) {
333
+ $result .= '<option' .
334
+ ' value="' . wppa_fix_poster_ext( $photo['id'] . '.' . $photo['ext'], $photo['id'] ) . '"' .
335
+ ( $selected == $photo['id'] ? ' selected="selected"' : '' ) .
336
+ ' >' .
337
+ $name .
338
+ ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
339
+ '</option>';
340
+ }
341
+ else {
342
+ $result .= '<option' .
343
+ ' value="' . wppa_fix_poster_ext( wppa_expand_id( $photo['id'] ) . '.' . $photo['ext'], $photo['id'] ) . '"' .
344
+ ( $selected == $photo['id'] ? ' selected="selected"' : '' ) .
345
+ ' >' .
346
+ $name .
347
+ ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
348
+ '</option>';
349
+ }
350
+ }
351
+ }
352
+ else {
353
+ $result .= '<option value="0" >' .
354
+ __( 'You have no photos yet', 'wp-photo-album-plus' ) .
355
+ '</option>';
356
+ }
357
+
358
+ return $result;
359
+ }
360
+
361
+ // The my photos selection box body
362
+ function wppa_get_allphotos_selection_body_for_tinymce() {
363
+ global $wpdb;
364
+
365
+ // Init
366
+ $result = '';
367
+
368
+ // Prepare photoinfo
369
+ $all_photos = $wpdb->get_results( "SELECT `id`, `name`, `album`, `ext` " .
370
+ "FROM `" . WPPA_PHOTOS . "` " .
371
+ "ORDER BY `timestamp` DESC LIMIT 100",
372
+ ARRAY_A );
373
+
374
+ if ( $all_photos ) {
375
+
376
+ // Please select
377
+ $result .= '<option' .
378
+ ' value=""' .
379
+ ' disabled="disabled"' .
380
+ ' selected="selected"' .
381
+ ' style="color:#700"' .
382
+ ' >' .
383
+ '-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
384
+ '</option>';
385
+
386
+ // Most recent 100 photos of this owner
387
+ foreach ( $all_photos as $photo ) {
388
+ $name = stripslashes(__($photo['name']));
389
+ if ( strlen($name) > '50') $name = substr($name, '0', '50').'...';
390
+ if ( get_option( 'wppa_file_system' ) == 'flat' ) {
391
+ $result .= '<option' .
392
+ ' value="' . wppa_fix_poster_ext( $photo['id'] . '.' . $photo['ext'], $photo['id'] ) . '"' .
393
+ ' >' .
394
+ $name .
395
+ ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
396
+ '</option>';
397
+ }
398
+ else {
399
+ $result .= '<option' .
400
+ ' value="' . wppa_fix_poster_ext( wppa_expand_id( $photo['id'] ) . '.' . $photo['ext'], $photo['id'] ) . '"' .
401
+ ' >' .
402
+ $name .
403
+ ' (' . wppa_get_album_name( $photo['album'] ) . ')' .
404
+ '</option>';
405
+ }
406
+ }
407
+ }
408
+ else {
409
+ $result .= '<option value="0" >' .
410
+ __( 'There are no photos yet', 'wp-photo-album-plus' ) .
411
+ '</option>';
412
+ }
413
+
414
+ return $result;
415
+ }
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 6.7.07
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 = '6707'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-7-07-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.7.08
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6708'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-7-08-005'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );