WP Photo Album Plus - Version 6.8.01

Version Description

Download this release

Release Info

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

Code changes from version 6.8.00 to 6.8.01

js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 6.8.00
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -268,17 +268,23 @@ function wppaToggleTable(table) {
268
  var wppaSubTabOn = new Array();
269
 
270
  function wppaToggleSubTable(table,subtable) {
 
 
271
  if (wppaSubTabOn[table+'-'+subtable]) {
272
  jQuery('.wppa-'+table+'-'+subtable).addClass('wppa-none');
 
273
  wppaSubTabOn[table+'-'+subtable] = false;
274
  wppa_tablecookieoff(table+'-'+subtable);
275
  }
 
 
276
  else {
277
  jQuery('.wppa-'+table+'-'+subtable).removeClass('wppa-none');
 
278
  wppaSubTabOn[table+'-'+subtable] = true;
279
  wppa_tablecookieon(table+'-'+subtable);
280
  }
281
- //alert("table+'-'+subtable = "+table+'-'+subtable+" wppaSubTabOn[table+'-'+subtable] = "+wppaSubTabOn[table+'-'+subtable]);
282
  }
283
 
284
  function wppaHideTable(table) {
@@ -1057,7 +1063,9 @@ function wppaAjaxDeletePhoto(photo, bef, aft) {
1057
  var str = wppaTrim(xmlhttp.responseText);
1058
  var ArrValues = str.split("||");
1059
  if ( ArrValues[0] == 'ER' ) {
1060
- alert(ArrValues[3]);
 
 
1061
  jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');
1062
  }
1063
  else if (ArrValues[0] != '') {
@@ -1110,7 +1118,9 @@ function wppaAjaxUndeletePhoto(photo) {
1110
  var str = wppaTrim(xmlhttp.responseText);
1111
  var ArrValues = str.split("||");
1112
  if ( ArrValues[0] == 'ER' ) {
1113
- alert(ArrValues[3]);
 
 
1114
  jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');
1115
  }
1116
  else if (ArrValues[0] != '') {
@@ -1764,7 +1774,7 @@ function wppaAjaxUpdateOptionCheckBox(slug, elem) {
1764
  case '0': // No error
1765
  jQuery('#img_'+slug).attr('src',wppaImageDirectory+'tick.png');
1766
  jQuery('#img_'+slug).attr('title',ArrValues[2]);
1767
- if ( ArrValues[3] != '' ) alert(ArrValues[3]);
1768
  if ( _wppaRefreshAfter ) {
1769
  _wppaRefreshAfter = false;
1770
  document.location.reload(true);
@@ -1773,7 +1783,7 @@ function wppaAjaxUpdateOptionCheckBox(slug, elem) {
1773
  default:
1774
  jQuery('#img_'+slug).attr('src',wppaImageDirectory+'cross.png');
1775
  jQuery('#img_'+slug).attr('title','Error #'+ArrValues[1]+', message: '+ArrValues[2]+', status: '+xmlhttp.status);
1776
- if ( ArrValues[3] != '' ) alert(ArrValues[3]);
1777
  if ( _wppaRefreshAfter ) {
1778
  _wppaRefreshAfter = false;
1779
  document.location.reload(true);
@@ -1794,7 +1804,7 @@ function wppaAjaxUpdateOptionCheckBox(slug, elem) {
1794
  xmlhttp.send();
1795
  }
1796
 
1797
- var wppaAlwaysContinue = 0;
1798
 
1799
  function wppaMaintenanceProc(slug, intern, asCronJob ) {
1800
 
@@ -1885,28 +1895,17 @@ function wppaMaintenanceProc(slug, intern, asCronJob ) {
1885
  },
1886
 
1887
  error: function( xhr, status, error ) {
1888
- wppaConsoleLog( 'wppaMaintenanceProc failed. Error = ' + error + ', status = ' + status, 'force' );
1889
- jQuery("#"+slug+"_status").html('Server error');
1890
  var wppaContinue = false;
 
1891
  if ( wppaAlwaysContinue < 1 ) {
1892
- wppaContinue = confirm( 'Server error.\nDo you want to continue?' );
1893
  if ( wppaContinue ) {
1894
- if ( wppaAlwaysContinue == 0 ) {
1895
- if ( slug == 'wppa_remake' ||
1896
- slug == 'wppa_regen_thumbs' ||
1897
- slug == 'wppa_create_o1_files' ||
1898
- slug == 'wppa_recup' ) {
1899
- if ( confirm( 'Always continue after server error?' ) ) {
1900
- wppaAlwaysContinue = 1;
1901
- }
1902
- }
1903
- else {
1904
- wppaAlwaysContinue = -1;
1905
- }
1906
- }
1907
  }
1908
  }
1909
- if ( wppaContinue || wppaAlwaysContinue == 1 ) {
1910
  if ( slug == 'wppa_remake' ) {
1911
  wppaAjaxUpdateOptionValue( 'wppa_remake_skip_one', 0 );
1912
  }
@@ -2029,7 +2028,7 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
2029
  case '0': // No error
2030
  jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'tick.png' );
2031
  // document.getElementById('img_'+slug).src = wppaImageDirectory+'tick.png';
2032
- if ( ArrValues[3] != '' ) alert(ArrValues[3]);
2033
  if ( _wppaRefreshAfter ) {
2034
  _wppaRefreshAfter = false;
2035
  document.location.reload(true);
@@ -2038,7 +2037,7 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
2038
  default:
2039
  jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2040
  // document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
2041
- if ( ArrValues[3] != '' ) alert(ArrValues[3]);
2042
  }
2043
  jQuery( '#img_'+slug ).attr( 'title', ArrValues[2] );
2044
  // document.getElementById('img_'+slug).title = ArrValues[2];
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 6.8.01
5
  /* Various js routines used in admin pages
6
  */
7
 
268
  var wppaSubTabOn = new Array();
269
 
270
  function wppaToggleSubTable(table,subtable) {
271
+
272
+ // Hide
273
  if (wppaSubTabOn[table+'-'+subtable]) {
274
  jQuery('.wppa-'+table+'-'+subtable).addClass('wppa-none');
275
+ jQuery('.wppa-'+table+'-'+subtable+'-help').css('display','none');
276
  wppaSubTabOn[table+'-'+subtable] = false;
277
  wppa_tablecookieoff(table+'-'+subtable);
278
  }
279
+
280
+ // Show
281
  else {
282
  jQuery('.wppa-'+table+'-'+subtable).removeClass('wppa-none');
283
+ jQuery('.wppa-'+table+'-'+subtable+'-h').css('display','');
284
  wppaSubTabOn[table+'-'+subtable] = true;
285
  wppa_tablecookieon(table+'-'+subtable);
286
  }
287
+
288
  }
289
 
290
  function wppaHideTable(table) {
1063
  var str = wppaTrim(xmlhttp.responseText);
1064
  var ArrValues = str.split("||");
1065
  if ( ArrValues[0] == 'ER' ) {
1066
+ if ( ArrValues[3] ) {
1067
+ alert(ArrValues[3] );
1068
+ }
1069
  jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');
1070
  }
1071
  else if (ArrValues[0] != '') {
1118
  var str = wppaTrim(xmlhttp.responseText);
1119
  var ArrValues = str.split("||");
1120
  if ( ArrValues[0] == 'ER' ) {
1121
+ if ( ArrValues[3] ) {
1122
+ alert( ArrValues[3] );
1123
+ }
1124
  jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');
1125
  }
1126
  else if (ArrValues[0] != '') {
1774
  case '0': // No error
1775
  jQuery('#img_'+slug).attr('src',wppaImageDirectory+'tick.png');
1776
  jQuery('#img_'+slug).attr('title',ArrValues[2]);
1777
+ if ( ArrValues[3] ) alert(ArrValues[3]);
1778
  if ( _wppaRefreshAfter ) {
1779
  _wppaRefreshAfter = false;
1780
  document.location.reload(true);
1783
  default:
1784
  jQuery('#img_'+slug).attr('src',wppaImageDirectory+'cross.png');
1785
  jQuery('#img_'+slug).attr('title','Error #'+ArrValues[1]+', message: '+ArrValues[2]+', status: '+xmlhttp.status);
1786
+ if ( ArrValues[3] ) alert(ArrValues[3]);
1787
  if ( _wppaRefreshAfter ) {
1788
  _wppaRefreshAfter = false;
1789
  document.location.reload(true);
1804
  xmlhttp.send();
1805
  }
1806
 
1807
+ var wppaAlwaysContinue = 10;
1808
 
1809
  function wppaMaintenanceProc(slug, intern, asCronJob ) {
1810
 
1895
  },
1896
 
1897
  error: function( xhr, status, error ) {
1898
+ wppaConsoleLog( 'wppaMaintenanceProc failed. Slug = ' + $slug + ', Error = ' + error + ', status = ' + status, 'force' );
1899
+ jQuery("#"+slug+"_status").html('Server error #'+(11-wppaAlwaysContinue));
1900
  var wppaContinue = false;
1901
+ wppaAlwaysContinue--;
1902
  if ( wppaAlwaysContinue < 1 ) {
1903
+ wppaContinue = confirm( '10 Server errors happened.\nDo you want to continue?' );
1904
  if ( wppaContinue ) {
1905
+ wppaAlwaysContinue = 10;
 
 
 
 
 
 
 
 
 
 
 
 
1906
  }
1907
  }
1908
+ if ( wppaContinue || wppaAlwaysContinue > 0 ) {
1909
  if ( slug == 'wppa_remake' ) {
1910
  wppaAjaxUpdateOptionValue( 'wppa_remake_skip_one', 0 );
1911
  }
2028
  case '0': // No error
2029
  jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'tick.png' );
2030
  // document.getElementById('img_'+slug).src = wppaImageDirectory+'tick.png';
2031
+ if ( ArrValues[3] ) alert(ArrValues[3]);
2032
  if ( _wppaRefreshAfter ) {
2033
  _wppaRefreshAfter = false;
2034
  document.location.reload(true);
2037
  default:
2038
  jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2039
  // document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
2040
+ if ( ArrValues[3] ) alert(ArrValues[3]);
2041
  }
2042
  jQuery( '#img_'+slug ).attr( 'title', ArrValues[2] );
2043
  // document.getElementById('img_'+slug).title = ArrValues[2];
js/wppa-admin-scripts.min.js CHANGED
@@ -1 +1 @@
1
- function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]),o.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("enable_video","wppa-video"),wppaCheckCheck("custom_fields","custfields"),wppaCheckCheck("album_custom_fields","albumcustfields"),wppaCheckCheck("new_mod_label_is_text","nmtxt"),wppaCheckCheck("coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);p.length>0&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){document.getElementById(e).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(e,t,p){var a="",o="";a=t||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+e;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==n.status){var t=wppaTrim(n.responseText).split("||");"ER"==t[0]?(alert(t[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),0==t[1]?document.getElementById("photostatus-"+e).innerHTML=t[2]:(document.getElementById("photoitem-"+e).innerHTML=a+t[2]+o,wppaProcessFull(t[3],t[4])),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(e){wppaFeAjaxLog("in");var t=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+e;p+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t.open("GET",p,!0),t.send(),t.onreadystatechange=function(){switch(t.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==t.status){var p=wppaTrim(t.responseText).split("||");"ER"==p[0]?(alert(p[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),0==p[1]?document.getElementById("photostatus-"+e).innerHTML=p[2]:document.getElementById("photoitem-"+e).innerHTML='<div style="padding-left:5px;" >'+p[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=before+'<span style="color:red;" >Comm error '+t.status+": "+t.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(e,t,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+e).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+e;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t&&(o+="&wppa-watermark-file="+t),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=wppaTrim(a.responseText).split("||");switch(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),t[1]){case"0":document.getElementById("photostatus-"+e).innerHTML=t[2];break;default:document.getElementById("photostatus-"+e).innerHTML='<span style="color:red">'+t[2]+"</span>"}jQuery("#wppa-water-spin-"+e).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+e).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(e,t,p,a,o,n){o||(o=""),n||(n="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[e]||(wppaAjaxPhotoCount[e]=0),wppaAjaxPhotoCount[e]++,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:1e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")")},success:function(i,s,l){var r=wppaTrim(i).split("||");switch(wppaAjaxPhotoCount[e]--,""!=r[0]&&alert("The server returned unexpected output:\n"+r[0]),r[1]){case"0":if(0==wppaAjaxPhotoCount[e]?jQuery("#photostatus-"+e).html(r[2]):jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")"),r[3]&&((u=jQuery("#fs-a-"+e).attr("href").split("="))[1]=parseInt(u[1])+1,jQuery("#fs-a-"+e).attr("href",u[0]+"="+u[1]),jQuery("#fs-img-"+e).attr("src",u[0]+"="+u[1])),r[4]){var u=jQuery("#tnp-"+e).attr("src").split("=");u[1]=parseInt(u[1])+1,jQuery("#tnp-"+e).attr("src",u[0]+"="+u[1])}void 0!==r[5]&&(jQuery("#imstack-"+e).html(r[5]),r[5].length>0?jQuery("#imstackbutton-"+e).css("display",""):jQuery("#imstackbutton-"+e).css("display","none")),void 0!==r[6]&&jQuery("#dispfileinfo-"+e).html(r[6]);break;case"99":jQuery("#photoitem-"+e).html(o+'<span style="color:red">'+r[2]+"</span>"+n);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+r[2]+" ("+r[1]+")</span>")}"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"hidden"});var c=0,d=-1;for(count=wppaPhotoUpdateMatrix.length;c<count;)wppaPhotoUpdateMatrix[c][0]==e&&wppaPhotoUpdateMatrix[c][1]==t&&(d=c),c++;if(wppaPhotoUpdateMatrix[d]&&(wppaPhotoUpdateMatrix[d][2]=p||0,wppaPhotoUpdateMatrix[d][4]=!1,wppaPhotoUpdateMatrix[d][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),a&&"0"==r[1])return jQuery("#photostatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+e)},1e3)},error:function(t,p,a){wppaAjaxPhotoCount[e]--,jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}function wppaAjaxUpdateAlbum(e,t,p,a){var o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(e,t,p,a,o){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("album-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:1e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(n,i,s){var l=wppaTrim(n).split("||");switch(wppaAjaxAlbumCount--,""!=l[0]&&alert("The server returned unexpected output:\n"+l[0]),l[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+e).html(l[2]):jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+e).html='<span style="color:red">'+l[2]+" ("+l[1]+")</span>"}if(void 0!==l[3]&&wppaProcessFull(l[3],l[4]),o&&"0"==l[1])return jQuery("#albumstatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==t&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var r=0,u=-1,c=wppaAlbumUpdateMatrix.length;r<c;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=r),r++;wppaAlbumUpdateMatrix[u][2]=p||0,wppaAlbumUpdateMatrix[u][4]=!1,wppaAlbumUpdateMatrix[u][5]=!1,wppaAjaxUpdateAlbumMonitor(a)},error:function(t,p,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),t>0?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(e,t,p){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+e+"&wppa-comment-id="+t+"&wppa-comment-status="+p+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var p=wppaTrim(a.responseText).split("||");switch(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"0":jQuery("#photostatus-"+e).html(p[2]);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+p[2]+"</span>")}jQuery("#wppa-comment-spin-"+t).css("visibility","hidden")}else jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(e,t){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+e;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,t.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var t=wppaTrim(p.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=p.status)switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+e).attr("title",t[2]),""!=t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Error #"+t[1]+", message: "+t[2]+", status: "+p.status),""!=t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}function wppaMaintenanceProc(e,t,p){if(p);else if(!t&&"yes"==document.getElementById(e+"_continue").value)return document.getElementById(e+"_continue").value="no",document.getElementById(e+"_button").value="Start!",void(jQuery("#"+e+"_togo").html()>0&&(jQuery("#"+e+"_status").html("Pausing..."),jQuery("#"+e+"_button").css("display","none")));p||(document.getElementById(e+"_continue").value="yes",document.getElementById(e+"_button").value="Stop!",""==jQuery("#"+e+"_status").html()&&jQuery("#"+e+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(p?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var o=e.split("||"),n=o[1],i=!1;return n?(o[0].length>10&&(alert("An error occurred:\n"+o[0]),i=!0),jQuery("#"+n+"_status").html(o[2]),jQuery("#"+n+"_togo").html(o[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==o[3]?"reload"==o[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?p||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(t,p,a){wppaConsoleLog("wppaMaintenanceProc failed. Error = "+a+", status = "+p,"force"),jQuery("#"+e+"_status").html("Server error");var o=!1;wppaAlwaysContinue<1&&(o=confirm("Server error.\nDo you want to continue?"))&&0==wppaAlwaysContinue&&("wppa_remake"==e||"wppa_regen_thumbs"==e||"wppa_create_o1_files"==e||"wppa_recup"==e?confirm("Always continue after server error?")&&(wppaAlwaysContinue=1):wppaAlwaysContinue=-1),(o||1==wppaAlwaysContinue)&&("wppa_remake"==e&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==e&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==e&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+e+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=p.responseText,i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(e,t,p){var a=wppaGetXmlHttp();a.onreadystatechange=function(){if(4!=a.readyState)jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");else{var t=wppaTrim(a.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=a.status){switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),""!=t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),""!=t[3]&&alert(t[3])}if(jQuery("#img_"+e).attr("title",t[2]),t[4])for(var p,o,n,i=t[4].split(";"),s=0;s<i.length;)p=i[s].split(":"),o=jQuery("#"+p[0]).html(),n=p[1],""!=o&&""==n&&(n='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(n),s++}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+e).title="Communication error";wppaCheckInconsistencies()}},eslug=wppaEncode(e);var o="action=wppa&wppa-action=update-option&wppa-option="+eslug;o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,0!=t&&(o+="number"==typeof t?"&value="+t:p?"&value="+wppaGetSelectionEnumByClass("."+e,","):"&value="+wppaEncode(t.value)),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)}function wppaEncode(e){var t,p;if(void 0!==e){if("number"==typeof e)return e;var a=(t=p=(t=p=(t=e).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),o=0;for(p="";o<a.length;)p+=a[o],++o<a.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(t.length>1)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),wppaFeCount>1&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],o=0,n=0;for(t||(t="."),p=jQuery(e),o=0,n=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+e,async:!0,type:"GET",timeout:1e5,beforeSend:function(t){jQuery("#"+e+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(t,p,a){alert("Export Db Table "+e+" failed. Error = "+a+", status = "+p)},complete:function(t,p,a){jQuery("#"+e+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+e,async:!0,type:"GET",timeout:1e5,beforesend:function(e){},success:function(t,p,a){var o=t.split("|");jQuery("#"+e+"_togo").html(o[0]);var n=jQuery("#"+e+"_status").html(),i=o[1];""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+e+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(e)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}var wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaImageDirectory,wppaAjaxUrl,wppaUploadToThisAlbum="Upload to this album",wppaSubTabOn=new Array,_wppaRefreshAfter=!1,wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array,_wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array,wppaAlwaysContinue=0,wppaFeCount=0;
1
+ function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#photostatus-"+t).html(e[2]),o.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("enable_video","wppa-video"),wppaCheckCheck("custom_fields","custfields"),wppaCheckCheck("album_custom_fields","albumcustfields"),wppaCheckCheck("new_mod_label_is_text","nmtxt"),wppaCheckCheck("coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);p.length>0&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){document.getElementById(e).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(e,t,p){var a="",o="";a=t||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+e;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==n.status){var t=wppaTrim(n.responseText).split("||");"ER"==t[0]?(t[3]&&alert(t[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),0==t[1]?document.getElementById("photostatus-"+e).innerHTML=t[2]:(document.getElementById("photoitem-"+e).innerHTML=a+t[2]+o,wppaProcessFull(t[3],t[4])),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(e){wppaFeAjaxLog("in");var t=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+e;p+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t.open("GET",p,!0),t.send(),t.onreadystatechange=function(){switch(t.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==t.status){var p=wppaTrim(t.responseText).split("||");"ER"==p[0]?(p[3]&&alert(p[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),0==p[1]?document.getElementById("photostatus-"+e).innerHTML=p[2]:document.getElementById("photoitem-"+e).innerHTML='<div style="padding-left:5px;" >'+p[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=before+'<span style="color:red;" >Comm error '+t.status+": "+t.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(e,t,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+e).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+e;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t&&(o+="&wppa-watermark-file="+t),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=wppaTrim(a.responseText).split("||");switch(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),t[1]){case"0":document.getElementById("photostatus-"+e).innerHTML=t[2];break;default:document.getElementById("photostatus-"+e).innerHTML='<span style="color:red">'+t[2]+"</span>"}jQuery("#wppa-water-spin-"+e).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+e).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(e,t,p,a,o,n){o||(o=""),n||(n="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[e]||(wppaAjaxPhotoCount[e]=0),wppaAjaxPhotoCount[e]++,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:1e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")")},success:function(i,s,l){var r=wppaTrim(i).split("||");switch(wppaAjaxPhotoCount[e]--,""!=r[0]&&alert("The server returned unexpected output:\n"+r[0]),r[1]){case"0":if(0==wppaAjaxPhotoCount[e]?jQuery("#photostatus-"+e).html(r[2]):jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")"),r[3]&&((u=jQuery("#fs-a-"+e).attr("href").split("="))[1]=parseInt(u[1])+1,jQuery("#fs-a-"+e).attr("href",u[0]+"="+u[1]),jQuery("#fs-img-"+e).attr("src",u[0]+"="+u[1])),r[4]){var u=jQuery("#tnp-"+e).attr("src").split("=");u[1]=parseInt(u[1])+1,jQuery("#tnp-"+e).attr("src",u[0]+"="+u[1])}void 0!==r[5]&&(jQuery("#imstack-"+e).html(r[5]),r[5].length>0?jQuery("#imstackbutton-"+e).css("display",""):jQuery("#imstackbutton-"+e).css("display","none")),void 0!==r[6]&&jQuery("#dispfileinfo-"+e).html(r[6]);break;case"99":jQuery("#photoitem-"+e).html(o+'<span style="color:red">'+r[2]+"</span>"+n);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+r[2]+" ("+r[1]+")</span>")}"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"hidden"});var c=0,d=-1;for(count=wppaPhotoUpdateMatrix.length;c<count;)wppaPhotoUpdateMatrix[c][0]==e&&wppaPhotoUpdateMatrix[c][1]==t&&(d=c),c++;if(wppaPhotoUpdateMatrix[d]&&(wppaPhotoUpdateMatrix[d][2]=p||0,wppaPhotoUpdateMatrix[d][4]=!1,wppaPhotoUpdateMatrix[d][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),a&&"0"==r[1])return jQuery("#photostatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+e)},1e3)},error:function(t,p,a){wppaAjaxPhotoCount[e]--,jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}function wppaAjaxUpdateAlbum(e,t,p,a){var o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(e,t,p,a,o){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("album-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:1e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(n,i,s){var l=wppaTrim(n).split("||");switch(wppaAjaxAlbumCount--,""!=l[0]&&alert("The server returned unexpected output:\n"+l[0]),l[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+e).html(l[2]):jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+e).html='<span style="color:red">'+l[2]+" ("+l[1]+")</span>"}if(void 0!==l[3]&&wppaProcessFull(l[3],l[4]),o&&"0"==l[1])return jQuery("#albumstatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==t&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var r=0,u=-1,c=wppaAlbumUpdateMatrix.length;r<c;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=r),r++;wppaAlbumUpdateMatrix[u][2]=p||0,wppaAlbumUpdateMatrix[u][4]=!1,wppaAlbumUpdateMatrix[u][5]=!1,wppaAjaxUpdateAlbumMonitor(a)},error:function(t,p,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),t>0?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(e,t,p){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+e+"&wppa-comment-id="+t+"&wppa-comment-status="+p+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var p=wppaTrim(a.responseText).split("||");switch(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"0":jQuery("#photostatus-"+e).html(p[2]);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+p[2]+"</span>")}jQuery("#wppa-comment-spin-"+t).css("visibility","hidden")}else jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(e,t){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+e;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,t.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var t=wppaTrim(p.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=p.status)switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+e).attr("title",t[2]),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Error #"+t[1]+", message: "+t[2]+", status: "+p.status),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}function wppaMaintenanceProc(e,t,p){if(p);else if(!t&&"yes"==document.getElementById(e+"_continue").value)return document.getElementById(e+"_continue").value="no",document.getElementById(e+"_button").value="Start!",void(jQuery("#"+e+"_togo").html()>0&&(jQuery("#"+e+"_status").html("Pausing..."),jQuery("#"+e+"_button").css("display","none")));p||(document.getElementById(e+"_continue").value="yes",document.getElementById(e+"_button").value="Stop!",""==jQuery("#"+e+"_status").html()&&jQuery("#"+e+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(p?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var o=e.split("||"),n=o[1],i=!1;return n?(o[0].length>10&&(alert("An error occurred:\n"+o[0]),i=!0),jQuery("#"+n+"_status").html(o[2]),jQuery("#"+n+"_togo").html(o[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==o[3]?"reload"==o[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?p||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(t,p,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+$slug+", Error = "+a+", status = "+p,"force"),jQuery("#"+e+"_status").html("Server error #"+(11-wppaAlwaysContinue));var o=!1;--wppaAlwaysContinue<1&&(o=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=10),(o||wppaAlwaysContinue>0)&&("wppa_remake"==e&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==e&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==e&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+e+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=p.responseText,i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(e,t,p){var a=wppaGetXmlHttp();a.onreadystatechange=function(){if(4!=a.readyState)jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");else{var t=wppaTrim(a.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=a.status){switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),t[3]&&alert(t[3])}if(jQuery("#img_"+e).attr("title",t[2]),t[4])for(var p,o,n,i=t[4].split(";"),s=0;s<i.length;)p=i[s].split(":"),o=jQuery("#"+p[0]).html(),n=p[1],""!=o&&""==n&&(n='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(n),s++}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+e).title="Communication error";wppaCheckInconsistencies()}},eslug=wppaEncode(e);var o="action=wppa&wppa-action=update-option&wppa-option="+eslug;o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,0!=t&&(o+="number"==typeof t?"&value="+t:p?"&value="+wppaGetSelectionEnumByClass("."+e,","):"&value="+wppaEncode(t.value)),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)}function wppaEncode(e){var t,p;if(void 0!==e){if("number"==typeof e)return e;var a=(t=p=(t=p=(t=e).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),o=0;for(p="";o<a.length;)p+=a[o],++o<a.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(t.length>1)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),wppaFeCount>1&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],o=0,n=0;for(t||(t="."),p=jQuery(e),o=0,n=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+e,async:!0,type:"GET",timeout:1e5,beforeSend:function(t){jQuery("#"+e+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(t,p,a){alert("Export Db Table "+e+" failed. Error = "+a+", status = "+p)},complete:function(t,p,a){jQuery("#"+e+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+e,async:!0,type:"GET",timeout:1e5,beforesend:function(e){},success:function(t,p,a){var o=t.split("|");jQuery("#"+e+"_togo").html(o[0]);var n=jQuery("#"+e+"_status").html(),i=o[1];""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+e+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(e)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}var wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaImageDirectory,wppaAjaxUrl,wppaUploadToThisAlbum="Upload to this album",wppaSubTabOn=new Array,_wppaRefreshAfter=!1,wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array,_wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array,wppaAlwaysContinue=10,wppaFeCount=0;
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.8.00
6
- Stable tag: 6.7.12
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -127,6 +127,27 @@ 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.8.00 =
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.8.01
6
+ Stable tag: 6.8.00
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.8.01 =
131
+
132
+ = Bug Fixes =
133
+
134
+ * Fixed layout issues of the album navigator widget and the album / photo admin pages.
135
+
136
+ = New Features =
137
+
138
+ * GPS and File tags are now supported in the exif system.
139
+
140
+ = Other Changes =
141
+
142
+ * Added to the bestof widget: A checkbox to display the sum of the ratings (totvalue), and the option to sort by the sum of the ratings.
143
+ * Bestof shortcode now also supports the display of the sum of the ratings (totvalue="yes"), and the sort option to sort by the sum of the ratings (sortby="totvalue").
144
+ The full shortcode is now: [wppa type="bestof" page="nn" count="nn" display="photo|owner" period="thisweek|lastweek|lastmonth|thismonth|lastyear|thisyear" sortby="maxratingcount|meanrating|ratingcount|totvalue" maxratings="yes|no" meanrat="yes|no" ratcount="yes|no" totvalue="no|yes" linktype="none|owneralbums|ownerphotos|upldrphotos" fontsize="nn" lineheight="nn" height="nn"][/wppa]
145
+ Note: For backward compatibility: the default for displaying the total value is no (totvalue="no") as opposed to the other display options.
146
+ * Exif arrays are now stored as arrays as opposed to multiple items with the same tag id. This enables interpretation and formatting of array value tags.
147
+ * Improved display of help text in settings and photo of the day settings admin pages.
148
+ * Removed obsolete browser specific css.
149
+ * Improved layout and behaviour of frontend upload dialog.
150
+
151
  = 6.8.00 =
152
 
153
  = Bug Fixes =
theme/wppa-style.css CHANGED
@@ -8,12 +8,10 @@
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
- /* This is version 6.7.03
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
15
- -moz-box-sizing:border-box;
16
- -webkit-box-sizing:border-box;
17
  box-sizing:border-box;
18
  }
19
 
@@ -48,8 +46,6 @@
48
  /* All boxes. Admin settings page defines border thickness and border radius */
49
  .wppa-box {
50
  padding: 2px 6px 3px 6px;
51
- -moz-box-sizing: border-box;
52
- -webkit-box-sizing:border-box;
53
  box-sizing: border-box;
54
  }
55
  .wppa-filmstrip-box {
@@ -386,8 +382,6 @@ border: 0;
386
 
387
  /* Fix for weaver II and theme 2013 */
388
  #wppa-overlay-ic img, #wppa-overlay-ic video {
389
- -webkit-box-sizing: content-box;
390
- -moz-box-sizing: content-box;
391
  box-sizing: content-box;
392
  }
393
 
@@ -411,7 +405,6 @@ float:left;
411
  /* Fix for css3 transition that interferes with jQuery animation */
412
  #wppa-overlay-ic img, .wppa-popup a img, .wppa-popup img {
413
  transition: width 0s ease-in-out 0s, left 0s ease-in-out 0s, right 0s ease-in-out 0s;
414
- -webkit-transition: width 0s ease-in-out 0s, left 0s ease-in-out 0s, right 0s ease-in-out 0s;
415
  }
416
 
417
  .wppa-fotomoto-checkout, .wppa-fotomoto-container {
@@ -483,3 +476,17 @@ display:none;
483
  .wppa-searchsel-item .screen-reader-text {
484
  display:none;
485
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
+ /* This is version 6.8.01
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
 
 
15
  box-sizing:border-box;
16
  }
17
 
46
  /* All boxes. Admin settings page defines border thickness and border radius */
47
  .wppa-box {
48
  padding: 2px 6px 3px 6px;
 
 
49
  box-sizing: border-box;
50
  }
51
  .wppa-filmstrip-box {
382
 
383
  /* Fix for weaver II and theme 2013 */
384
  #wppa-overlay-ic img, #wppa-overlay-ic video {
 
 
385
  box-sizing: content-box;
386
  }
387
 
405
  /* Fix for css3 transition that interferes with jQuery animation */
406
  #wppa-overlay-ic img, .wppa-popup a img, .wppa-popup img {
407
  transition: width 0s ease-in-out 0s, left 0s ease-in-out 0s, right 0s ease-in-out 0s;
 
408
  }
409
 
410
  .wppa-fotomoto-checkout, .wppa-fotomoto-container {
476
  .wppa-searchsel-item .screen-reader-text {
477
  display:none;
478
  }
479
+
480
+ /* Frontend upload */
481
+ .wppa-upload-table {
482
+ border:none;
483
+ }
484
+ .wppa-upload-th {
485
+ width:40%;
486
+ border:none;
487
+ }
488
+ .wppa-upload-td {
489
+ text-align:center;
490
+ width:60%;
491
+ border:none;
492
+ }
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.8.00
6
  *
7
  */
8
 
@@ -124,7 +124,6 @@ global $wppa_log_file;
124
  if ( ! $any ) {
125
  $query = $wpdb->prepare( "UPDATE `" . WPPA_IPTC . "` SET `status` = 'hide' WHERE `photo` = '0' AND `tag` = %s", $tag );
126
  $wpdb->query( $query );
127
- // wppa_log( 'dbg', $query );
128
  }
129
  wppa_exit();
130
  break;
@@ -133,11 +132,20 @@ global $wppa_log_file;
133
  $tag = str_replace( 'H', '#', substr( $_REQUEST['tag'], 0, 6 ) );
134
  $brand = substr( $_REQUEST['tag'], 6 );
135
  $mocc = $_REQUEST['moccur'];
136
- $oldvalue = '';
 
137
 
138
  if ( strpos( $wppa_session['supersearch'], ',' ) !== false ) {
139
- $ss_data = explode( ',', $wppa_session['supersearch'] );
140
- if ( count( $ss_data ) == '4' ) {
 
 
 
 
 
 
 
 
141
  if ( $ss_data['0'] == 'p' ) {
142
  if ( $ss_data['1'] == 'e' ) {
143
  if ( $ss_data['2'] == $_REQUEST['tag'] ) {
@@ -168,92 +176,52 @@ global $wppa_log_file;
168
  "ORDER BY `f_description`", $tag, __( 'n.a.', 'wp-photo-album-plus' ) ), ARRAY_A );
169
  }
170
 
171
- // Some exif data need sorting in a human understandable logical way.
172
- switch ( $tag ) {
173
- /*
174
- // FNumber
175
- case 'E#829D':
176
-
177
- foreach ( array_keys( $exifdata ) as $key ) {
178
- $temp = $exifdata[$key]['f_description'];
179
- if ( strpos( $temp, '.' ) === false ) { // If int, append .0
180
- $temp .= '.0';
181
- }
182
- $temp = substr( $temp, 2 ); // Strip 'f/'
183
- while ( strlen( $temp ) < 5 ) { // Add leading 0's
184
- $temp = '0' . $temp;
185
- }
186
- $exifdata[$key]['sort'] = $temp;
187
- }
188
-
189
- $exifdata = wppa_array_sort( $exifdata, 'sort' );
190
- break;
191
 
192
- // Subject distance
193
- case 'E#9206':
194
 
195
- foreach ( array_keys( $exifdata ) as $key ) {
196
- $temp = $exifdata[$key]['f_description'];
197
- $temp = rtrim( $temp, ' m.' );
198
- if ( strpos( $temp, '.' ) === false ) { // If int, append .0
199
- $temp .= '.0';
200
- }
201
- while ( strlen( substr( $temp, strpos( $temp, '.' ) ) ) < 2 ) { // Make sure 2 decimal digits
202
- $temp .= '0';
203
- }
204
- while ( strlen( $temp ) < 8 ) {
205
- $temp = '0' . $temp; // Add leading 0's
206
- }
207
- $exifdata[$key]['sort'] = $temp;
208
- }
209
-
210
- $exifdata = wppa_array_sort( $exifdata, 'sort' );
211
- break;
212
- */
213
- // Numerical values
214
- case 'E#0102': // BitsPerSample
215
- case 'E#829A': // ExposureTime
216
- case 'E#829D': // FNumber
217
- case 'E#9202': // ApertureValue
218
- case 'E#9203': // BrightnessValue
219
- case 'E#9206': // SubjectDistance
220
- case 'E#920A': // FocalLength
221
- case 'E#A405': // FocalLengthIn35mmFilm
222
-
223
- foreach ( array_keys( $exifdata ) as $key ) {
224
- $temp = $exifdata[$key]['f_description'];
225
- if ( $temp != __( 'n.a.', 'wp-photo-album-plus' ) ) {
226
- $temp = trim( $temp, ' smf/.' );
227
- if ( strpos( $temp, '/' ) ) {
228
- $temp = explode( '/', $temp );
229
- if ( $temp[1] != 0 ) {
230
- $temp = $temp[0] / $temp[1];
231
- }
232
- else {
233
- $temp = 999999;
234
- }
235
- }
236
- $exifdata[$key]['sort'] = sprintf( '%020.12f', $temp );
237
  }
238
  else {
239
- $exifdata[$key]['sort'] = $temp;
240
  }
241
  }
242
 
243
- $exifdata = wppa_array_sort( $exifdata, 'sort' );
244
- break;
 
 
 
 
 
245
  }
246
 
 
 
247
 
 
248
  $any = false;
249
  if ( ! empty( $exifdata ) ) foreach( $exifdata as $item ) {
250
  $desc = sanitize_text_field( $item['f_description'] );
251
  $desc = str_replace( array(chr(0),chr(1),chr(2),chr(3),chr(4),chr(5),chr(6),chr(7)), '', $desc );
 
252
 
253
  if ( $desc ) {
254
 
255
  $sel = ( $oldvalue && $oldvalue == $desc ) ? 'selected="selected"' : '';
256
- $ddesc = strlen( $desc ) > '32' ? substr( $desc, 0, 30 ) . '...' : $desc;
 
 
 
 
 
257
 
258
  echo '<option' .
259
  ' value="' . esc_attr( $desc ) . '"' .
@@ -695,7 +663,7 @@ global $wppa_log_file;
695
  }
696
 
697
  // Make the file
698
- if ( wppa_switch( 'artmonkey_use_source' ) ) {
699
  if ( is_file ( wppa_get_source_path( $photo ) ) ) {
700
  $source = wppa_get_source_path( $photo );
701
  }
@@ -708,9 +676,10 @@ global $wppa_log_file;
708
  }
709
 
710
  // Fix the extension for mm items.
711
- if ( $data['ext'] == 'xxx' ) {
712
  $data['ext'] = wppa_get_ext( $source );
713
  }
 
714
  $dest = WPPA_UPLOAD_PATH.'/temp/'.$name.'.'.$data['ext'];
715
  $zipfile = WPPA_UPLOAD_PATH.'/temp/'.$name.'.zip';
716
  $tempdir = WPPA_UPLOAD_PATH.'/temp';
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.8.01
6
  *
7
  */
8
 
124
  if ( ! $any ) {
125
  $query = $wpdb->prepare( "UPDATE `" . WPPA_IPTC . "` SET `status` = 'hide' WHERE `photo` = '0' AND `tag` = %s", $tag );
126
  $wpdb->query( $query );
 
127
  }
128
  wppa_exit();
129
  break;
132
  $tag = str_replace( 'H', '#', substr( $_REQUEST['tag'], 0, 6 ) );
133
  $brand = substr( $_REQUEST['tag'], 6 );
134
  $mocc = $_REQUEST['moccur'];
135
+ $oldvalue = '';
136
+ $ss_data = array();
137
 
138
  if ( strpos( $wppa_session['supersearch'], ',' ) !== false ) {
139
+ $data = explode( ',', $wppa_session['supersearch'] );
140
+ if ( count( $data ) >= '4' ) {
141
+
142
+ // Value may contain commas
143
+ for ( $i=0; $i<3; $i++ ){
144
+ $ss_data[$i] = $data[$i];
145
+ unset( $data[$i] );
146
+ }
147
+ $ss_data[3] = implode( ',', $data );
148
+
149
  if ( $ss_data['0'] == 'p' ) {
150
  if ( $ss_data['1'] == 'e' ) {
151
  if ( $ss_data['2'] == $_REQUEST['tag'] ) {
176
  "ORDER BY `f_description`", $tag, __( 'n.a.', 'wp-photo-album-plus' ) ), ARRAY_A );
177
  }
178
 
179
+ // Make the data sortable.
180
+ foreach ( array_keys( $exifdata ) as $key ) {
181
+ $temp = $exifdata[$key]['f_description'];
182
+ $temp = trim( $temp, ' smf/.px' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
+ if ( strpos( $temp, '/' ) ) {
 
185
 
186
+ $t = explode( '/', $temp );
187
+ if ( count( $t ) == 2 && is_numeric( $t[0] ) && is_numeric( $t[1] ) ) {
188
+ $temp = $t;
189
+ if ( $temp[1] != 0 ) {
190
+ $temp = $temp[0] / $temp[1];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  }
192
  else {
193
+ $temp = 999999;
194
  }
195
  }
196
 
197
+ }
198
+ if ( is_numeric( $temp ) ) {
199
+ $exifdata[$key]['sort'] = sprintf( '%020.12f', $temp );
200
+ }
201
+ else {
202
+ $exifdata[$key]['sort'] = $exifdata[$key]['f_description'];
203
+ }
204
  }
205
 
206
+ // Sort
207
+ $exifdata = wppa_array_sort( $exifdata, 'sort' );
208
 
209
+ // Make the selectionbox content
210
  $any = false;
211
  if ( ! empty( $exifdata ) ) foreach( $exifdata as $item ) {
212
  $desc = sanitize_text_field( $item['f_description'] );
213
  $desc = str_replace( array(chr(0),chr(1),chr(2),chr(3),chr(4),chr(5),chr(6),chr(7)), '', $desc );
214
+ $desc = trim( $desc );
215
 
216
  if ( $desc ) {
217
 
218
  $sel = ( $oldvalue && $oldvalue == $desc ) ? 'selected="selected"' : '';
219
+ $ddesc = strlen( $desc ) > '42' ? substr( $desc, 0, 40 ) . '...' : $desc;
220
+ if ( wppa_is_valid_rational( $ddesc, false ) ) {
221
+ $t = explode( '/', $ddesc );
222
+ $l = strlen( $ddesc );
223
+ $ddesc = '(' . sprintf( '%5.2f', $t[0]/$t[1] ) . ') ' . $ddesc;
224
+ }
225
 
226
  echo '<option' .
227
  ' value="' . esc_attr( $desc ) . '"' .
663
  }
664
 
665
  // Make the file
666
+ if ( wppa_switch( 'artmonkey_use_source' ) || strtolower( wppa_get_ext( $data['filename'] ) ) == 'pdf' ) {
667
  if ( is_file ( wppa_get_source_path( $photo ) ) ) {
668
  $source = wppa_get_source_path( $photo );
669
  }
676
  }
677
 
678
  // Fix the extension for mm items.
679
+ if ( $data['ext'] == 'xxx' || strtolower( wppa_get_ext( $data['filename'] ) ) == 'pdf' ) {
680
  $data['ext'] = wppa_get_ext( $source );
681
  }
682
+
683
  $dest = WPPA_UPLOAD_PATH.'/temp/'.$name.'.'.$data['ext'];
684
  $zipfile = WPPA_UPLOAD_PATH.'/temp/'.$name.'.zip';
685
  $tempdir = WPPA_UPLOAD_PATH.'/temp';
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -779,8 +779,6 @@ function wppaTryScheduleAll( id ) {
779
  '<span class="description" >' .
780
  __( 'Separate categories with commas.', 'wp-photo-album-plus' ) .
781
  '</span>' .
782
- '</td>' .
783
- '<td>' .
784
  '<select' .
785
  ' onchange="wppaAddCat( this.value, \'cats\' ); wppaAjaxUpdateAlbum( ' . $id . ', \'cats\', document.getElementById( \'cats\' ) )"' .
786
  ' >';
@@ -797,6 +795,8 @@ function wppaTryScheduleAll( id ) {
797
  echo
798
  '</select>' .
799
  '</td>' .
 
 
800
  '</tr>';
801
 
802
  // Default tags
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 6.8.01
7
  *
8
  */
9
 
779
  '<span class="description" >' .
780
  __( 'Separate categories with commas.', 'wp-photo-album-plus' ) .
781
  '</span>' .
 
 
782
  '<select' .
783
  ' onchange="wppaAddCat( this.value, \'cats\' ); wppaAjaxUpdateAlbum( ' . $id . ', \'cats\', document.getElementById( \'cats\' ) )"' .
784
  ' >';
795
  echo
796
  '</select>' .
797
  '</td>' .
798
+ '<td>' .
799
+ '</td>' .
800
  '</tr>';
801
 
802
  // Default tags
wppa-album-navigator-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
- * Version 6.7.07
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
@@ -51,7 +51,7 @@ class AlbumNavigatorWidget extends WP_Widget {
51
  $widget_content .= __( 'There are too many albums in the system for this widget', 'wp-photo-album-plus' );
52
  }
53
  else {
54
- $widget_content .= '<div style="width:100%; overflow:hidden; position:relative; left: -12px;" >';
55
  if ( $parent == 'all' ) {
56
  $widget_content .= $this->do_album_navigator( '0', $page, $skip, '' );
57
  $widget_content .= $this->do_album_navigator( '-1', $page, $skip, '' );
@@ -63,7 +63,7 @@ class AlbumNavigatorWidget extends WP_Widget {
63
  else {
64
  $widget_content .= $this->do_album_navigator( $parent, $page, $skip, '' );
65
  }
66
- $widget_content .= '</div>';
67
  $widget_content .= '<div style="clear:both"></div>';
68
  }
69
 
@@ -186,17 +186,43 @@ class AlbumNavigatorWidget extends WP_Widget {
186
  $treecount = wppa_get_treecounts_a( $a );
187
  if ( $treecount['treealbums'] || $treecount['selfphotos'] > wppa_opt( 'min_thumbs' ) || ! $skip ) {
188
  $result .= '
189
- <li class="anw-'.$w.'-'.$p.$propclass.'" style="list-style:none; display:'.( $level == '1' ? '' : 'none' ).';">';
190
  if ( wppa_has_children($a) ) $result .= '
191
- <div style="cursor:default;width:12px;float:left;text-align:center;font-weight:bold;" class="anw-'.$w.'-'.$a.'-" onclick="jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\'); jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');" >'.( $a == $ca ? '&raquo;' : '+').'</div>
192
- <div style="cursor:default;width:12px;float:left;text-align:center;font-weight:bold;display:none;" class="anw-'.$w.'-'.$a.'" onclick="jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\'); jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'none\'); jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');" >'.( $a == $ca ? '&raquo;' : '-').'</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  else $result .= '
194
- <span style="width:12px;" >&nbsp;' . ( $a == $ca ? '&raquo;' : '&nbsp;' ) . '</span>';
195
  $result .= '
196
- <a href="'.wppa_encrypt_url(wppa_get_permalink( $page ).'&amp;wppa-album='.$a.'&amp;wppa-cover=0&amp;wppa-occur=1'.$slide).'">'.wppa_get_album_name( $a ).'</a>
 
 
 
 
 
197
  </li>';
198
  $newpropclass = $propclass . ' p-'.$w.'-'.$p;
199
- $result .= '<li class="anw-'.$w.'-'.$p.$propclass.'" style="list-style:none;" >' . $this->do_album_navigator( $a, $page, $skip, $newpropclass, $extraclause ) . '</li>';
 
 
 
 
200
  }
201
  }
202
  $result .= '</ul>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
+ * Version 6.8.01
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
51
  $widget_content .= __( 'There are too many albums in the system for this widget', 'wp-photo-album-plus' );
52
  }
53
  else {
54
+ // $widget_content .= '<div style="width:100%; overflow:hidden; position:relative; left: -12px;" >';
55
  if ( $parent == 'all' ) {
56
  $widget_content .= $this->do_album_navigator( '0', $page, $skip, '' );
57
  $widget_content .= $this->do_album_navigator( '-1', $page, $skip, '' );
63
  else {
64
  $widget_content .= $this->do_album_navigator( $parent, $page, $skip, '' );
65
  }
66
+ // $widget_content .= '</div>';
67
  $widget_content .= '<div style="clear:both"></div>';
68
  }
69
 
186
  $treecount = wppa_get_treecounts_a( $a );
187
  if ( $treecount['treealbums'] || $treecount['selfphotos'] > wppa_opt( 'min_thumbs' ) || ! $skip ) {
188
  $result .= '
189
+ <li class="anw-'.$w.'-'.$p.$propclass.'" style="list-style:none;'.( $level == '1' ? '' : 'display:none;' ).'">';
190
  if ( wppa_has_children($a) ) $result .= '
191
+ <div' .
192
+ ' style="cursor:default;width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;"' .
193
+ ' class="anw-'.$w.'-'.$a.'-"' .
194
+ ' onclick="' .
195
+ 'jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\');' .
196
+ 'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');' .
197
+ '" >' .
198
+ ( $a == $ca ? '&raquo;' : '+') .
199
+ '</div>
200
+ <div' .
201
+ ' style="cursor:default;width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;display:none;"' .
202
+ ' class="anw-'.$w.'-'.$a.'"' .
203
+ ' onclick="' .
204
+ 'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\');' .
205
+ 'jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'none\');' .
206
+ 'jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');' .
207
+ '" >' .
208
+ ( $a == $ca ? '&raquo;' : '-') .
209
+ '</div>';
210
  else $result .= '
211
+ <div style="width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;" >' . ( $a == $ca ? '&raquo;' : '&nbsp;' ) . '</div>';
212
  $result .= '
213
+ <a' .
214
+ ' href="'.wppa_encrypt_url(wppa_get_permalink( $page ).'&amp;wppa-album='.$a.'&amp;wppa-cover=0&amp;wppa-occur=1'.$slide).'"' .
215
+ ' style="position:relative;left:-8px;"' .
216
+ ' >' .
217
+ wppa_get_album_name( $a ) .
218
+ '</a>
219
  </li>';
220
  $newpropclass = $propclass . ' p-'.$w.'-'.$p;
221
+
222
+ $next_level = $this->do_album_navigator( $a, $page, $skip, $newpropclass, $extraclause );
223
+ if ( $next_level ) {
224
+ $result .= '<li class="anw-'.$w.'-'.$a.$propclass.'" style="list-style:none;display:none;" >' . $next_level . '</li>';
225
+ }
226
  }
227
  }
228
  $result .= '</ul>';
wppa-bestof-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
- * Version 6.7.06
7
  *
8
  */
9
 
@@ -44,6 +44,7 @@ class BestOfWidget extends WP_Widget {
44
  'meanrat' => 'yes',
45
  'ratcount' => 'yes',
46
  'linktype' => 'none',
 
47
  ) );
48
 
49
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
@@ -58,6 +59,7 @@ class BestOfWidget extends WP_Widget {
58
  $linktype = $instance['linktype'];
59
  $size = wppa_opt( 'widget_width' );
60
  $lineheight = wppa_opt( 'fontsize_widget_thumb' ) * 1.5;
 
61
 
62
  $widget_content = "\n".'<!-- WPPA+ BestOf Widget start -->';
63
 
@@ -72,6 +74,7 @@ class BestOfWidget extends WP_Widget {
72
  'linktype' => $linktype,
73
  'size' => $size,
74
  'lineheight' => $lineheight,
 
75
  ) );
76
 
77
  $widget_content .= '<div style="clear:both"></div>';
@@ -99,6 +102,7 @@ class BestOfWidget extends WP_Widget {
99
  $instance['meanrat'] = $new_instance['meanrat'];
100
  $instance['ratcount'] = $new_instance['ratcount'];
101
  $instance['linktype'] = $new_instance['linktype'];
 
102
 
103
  return $instance;
104
  }
@@ -116,7 +120,8 @@ class BestOfWidget extends WP_Widget {
116
  'maxratings'=> 'yes',
117
  'meanrat' => 'yes',
118
  'ratcount' => 'yes',
119
- 'linktype' => 'none'
 
120
  ) );
121
 
122
  // WP Bug?
@@ -164,10 +169,12 @@ class BestOfWidget extends WP_Widget {
164
  $options = array( __( 'Number of max ratings', 'wp-photo-album-plus' ),
165
  __( 'Mean value', 'wp-photo-album-plus' ),
166
  __( 'Number of votes', 'wp-photo-album-plus' ),
 
167
  );
168
  $values = array( 'maxratingcount',
169
  'meanrating',
170
  'ratingcount',
 
171
  );
172
  echo
173
  wppa_widget_selection( $this, 'sortby', $instance['sortby'], __( 'Sort by', 'wp-photo-album-plus' ), $options, $values, array(), '' ) .
@@ -179,7 +186,10 @@ class BestOfWidget extends WP_Widget {
179
  wppa_widget_checkbox( $this, 'meanrat', $instance['meanrat'], __( 'Show mean rating', 'wp-photo-album-plus') ) .
180
 
181
  // Number of ratings
182
- wppa_widget_checkbox( $this, 'ratcount', $instance['ratcount'], __( 'Show number of ratings', 'wp-photo-album-plus') );
 
 
 
183
 
184
  // Link to
185
  $options = array( __( '--- none ---', 'wp-photo-album-plus' ),
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
+ * Version 6.8.01
7
  *
8
  */
9
 
44
  'meanrat' => 'yes',
45
  'ratcount' => 'yes',
46
  'linktype' => 'none',
47
+ 'totvalue' => '',
48
  ) );
49
 
50
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
59
  $linktype = $instance['linktype'];
60
  $size = wppa_opt( 'widget_width' );
61
  $lineheight = wppa_opt( 'fontsize_widget_thumb' ) * 1.5;
62
+ $total = $instance['totvalue'] ? 'yes' : '';
63
 
64
  $widget_content = "\n".'<!-- WPPA+ BestOf Widget start -->';
65
 
74
  'linktype' => $linktype,
75
  'size' => $size,
76
  'lineheight' => $lineheight,
77
+ 'totvalue' => $total,
78
  ) );
79
 
80
  $widget_content .= '<div style="clear:both"></div>';
102
  $instance['meanrat'] = $new_instance['meanrat'];
103
  $instance['ratcount'] = $new_instance['ratcount'];
104
  $instance['linktype'] = $new_instance['linktype'];
105
+ $instance['totvalue'] = $new_instance['totvalue'];
106
 
107
  return $instance;
108
  }
120
  'maxratings'=> 'yes',
121
  'meanrat' => 'yes',
122
  'ratcount' => 'yes',
123
+ 'linktype' => 'none',
124
+ 'totvalue' => '',
125
  ) );
126
 
127
  // WP Bug?
169
  $options = array( __( 'Number of max ratings', 'wp-photo-album-plus' ),
170
  __( 'Mean value', 'wp-photo-album-plus' ),
171
  __( 'Number of votes', 'wp-photo-album-plus' ),
172
+ __( 'Sum of all ratings', 'wp-photo-album-plus' ),
173
  );
174
  $values = array( 'maxratingcount',
175
  'meanrating',
176
  'ratingcount',
177
+ 'totvalue',
178
  );
179
  echo
180
  wppa_widget_selection( $this, 'sortby', $instance['sortby'], __( 'Sort by', 'wp-photo-album-plus' ), $options, $values, array(), '' ) .
186
  wppa_widget_checkbox( $this, 'meanrat', $instance['meanrat'], __( 'Show mean rating', 'wp-photo-album-plus') ) .
187
 
188
  // Number of ratings
189
+ wppa_widget_checkbox( $this, 'ratcount', $instance['ratcount'], __( 'Show number of ratings', 'wp-photo-album-plus') ) .
190
+
191
+ // Total value
192
+ wppa_widget_checkbox( $this, 'totvalue', $instance['totvalue'], __( 'Show the sum of all ratings', 'wp-photo-album-plus' ) );
193
 
194
  // Link to
195
  $options = array( __( '--- none ---', 'wp-photo-album-plus' ),
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -930,7 +930,7 @@ global $wppa_supported_camara_brands;
930
  // Add brand specific tagname(s)
931
  $brandfound = false;
932
  foreach( $wppa_supported_camara_brands as $brand ) {
933
- $brtagnam = trim( wppa_exif_tagname( hexdec( substr( $tag, 2, 4 ) ), $brand, 'brandonly' ), ': ' );
934
  if ( $brtagnam ) {
935
  $options_array[] = array( 'tag' => $tag . $brand, 'desc' => $brtagnam . ' (' . ucfirst( strtolower( $brand ) ) . ')' );
936
  $brandfound = true;
@@ -2178,7 +2178,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2178
  'jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show backlink
2179
  '_wppaDoAutocol( ' . $mocc . ' )'. // Trigger autocol
2180
  '"' .
2181
- ' style="float:left; cursor:pointer;"' .
2182
  '> ' .
2183
  ( $alb ? __( 'Create Sub Album', 'wp-photo-album-plus' ) : __( 'Create Album', 'wp-photo-album-plus' ) ) .
2184
  '</a>' .
@@ -2194,7 +2194,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2194
  'jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
2195
  '_wppaDoAutocol( ' . $mocc . ' )'. // Trigger autocol
2196
  '"' .
2197
- ' style="float:right; cursor:pointer;display:none;"' .
2198
  ' >' .
2199
  __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
2200
  '</a>';
@@ -2295,6 +2295,7 @@ function wppa_user_upload_html( $alb, $width, $where = '', $mcr = false ) {
2295
 
2296
  function wppa_get_user_upload_html( $xalb, $width, $where = '', $mcr = false ) {
2297
  global $wpdb;
 
2298
  global $wppa_supported_video_extensions;
2299
  global $wppa_supported_audio_extensions;
2300
  static $seqno;
@@ -2508,6 +2509,9 @@ static $albums_granted;
2508
 
2509
  // Make the HTML
2510
  $t = $mcr ? 'mcr-' : '';
 
 
 
2511
  $result .=
2512
  '<a' .
2513
  ' id="wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'"' .
@@ -2537,7 +2541,7 @@ static $albums_granted;
2537
  'jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
2538
  '_wppaDoAutocol( ' . $mocc . ' )' . // Trigger autocol
2539
  '"' .
2540
- ' style="float:right; cursor:pointer;display:none;' .
2541
  '" >' .
2542
  __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
2543
  '</a>' .
@@ -2563,10 +2567,17 @@ static $albums_granted;
2563
  ' name="wppa-upload-album"' .
2564
  ' value="'.$alb.'"' .
2565
  ' />';
 
 
 
2566
  }
2567
 
2568
  // Array given
2569
  else {
 
 
 
 
2570
  if ( ! is_array( $alb ) ) {
2571
  $alb = explode( '.', wppa_expand_enum( $alb ) );
2572
  }
@@ -2574,39 +2585,47 @@ static $albums_granted;
2574
  // Can an selection box be displayed?
2575
  if ( ! wppa_opt( 'fe_upload_max_albums' ) || // No limit on number of albums
2576
  wppa_opt( 'fe_upload_max_albums' ) > wppa_get_uploadable_album_count( $alb ) ) { // Below max
2577
- $result .=
2578
- '<select' .
2579
- ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
2580
- ' name="wppa-upload-album"' .
2581
- ' style="float:left; max-width: 100%;"' .
2582
- ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
2583
- ' >' .
2584
- wppa_album_select_a( array ( 'addpleaseselect' => true,
2585
- 'checkowner' => true,
2586
- 'checkupload' => true,
2587
- 'path' => wppa_switch( 'hier_albsel' ),
2588
- 'checkarray' => count( $alb ) > 1,
2589
- 'array' => $alb,
2590
- ) ) .
2591
- '</select>' .
2592
- '<br />';
2593
  }
2594
 
2595
  // No, there are too many albums
2596
  else {
2597
- $result .=
2598
  '<input' .
2599
  ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
2600
  ' type="number"' .
2601
  ' placeholder="' . esc_attr( __( 'Enter album id', 'wp-photo-album-plus' ) ) . '"' .
2602
  ' name="wppa-upload-album"' .
2603
- ' style="float:left; max-width: 100%;"' .
2604
  ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
2605
- ' />' .
2606
- '<br />';
2607
  }
2608
  }
2609
 
 
 
 
 
 
 
 
 
 
2610
  $one_only = wppa_switch( 'upload_one_only' );
2611
  $multiple = ! $one_only;
2612
  $on_camera = wppa_switch( 'camera_connect' );
@@ -2624,49 +2643,28 @@ static $albums_granted;
2624
  $accept .= ',.pdf';
2625
  }
2626
 
 
2627
  if ( $one_only ) {
2628
  if ( $on_camera ) {
2629
- if ( $may_video ) {
2630
- $value = esc_attr( __( 'Select Photo / Video / Camera', 'wp-photo-album-plus' ) );
2631
- }
2632
- else {
2633
- $value = esc_attr( __( 'Select Photo / Camera', 'wp-photo-album-plus' ) );
2634
- }
2635
  }
2636
  else {
2637
- if ( $may_video ) {
2638
- $value = esc_attr( __( 'Select Photo / Video', 'wp-photo-album-plus' ) );
2639
- }
2640
- else {
2641
- $value = esc_attr( __( 'Select Photo', 'wp-photo-album-plus' ) );
2642
- }
2643
  }
2644
  }
2645
  else {
2646
  if ( $on_camera ) {
2647
- if ( $may_video ) {
2648
- $value = esc_attr( __( 'Select Photos / Video / Camera', 'wp-photo-album-plus' ) );
2649
- }
2650
- else {
2651
- $value = esc_attr( __( 'Select Photos / Camera', 'wp-photo-album-plus' ) );
2652
- }
2653
  }
2654
  else {
2655
- if ( $may_video ) {
2656
- $value = esc_attr( __( 'Select Photos / Video', 'wp-photo-album-plus' ) );
2657
- }
2658
- else {
2659
- $value = esc_attr( __( 'Select Photos', 'wp-photo-album-plus' ) );
2660
- }
2661
  }
2662
  }
2663
- if ( wppa_can_pdf() ) {
2664
- $value .= ' / Pdf';
2665
- }
2666
 
2667
- $result .=
2668
 
2669
  // Save the button text
 
2670
  '<script>var wppaUploadButtonText="' . esc_js( $value ) . '"</script>' .
2671
 
2672
  // The (hidden) functional button
@@ -2685,26 +2683,52 @@ static $albums_granted;
2685
  '"' .
2686
  ' />';
2687
 
2688
- if ( $on_camera ) {
2689
- $result .= '<script>jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').attr(\'capture\',\'capture\')</script>';
2690
- }
2691
-
2692
- $result .=
2693
-
2694
  // The displayed button
 
2695
  '<input' .
2696
  ' type="button"' .
2697
- ' style="width:100%;margin-top:8px;margin-bottom:8px;padding-left:0;padding-right:0;"' .
2698
  ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '-display"' .
2699
  ' class="wppa-upload-button"' .
2700
  ' value="' . $value . '"' .
2701
- ' onclick="jQuery( \'#wppa-user-upload-' . $yalb . '-' . $mocc . '\' ).click();"' .
 
 
 
2702
  '/>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2703
 
2704
  // Explanation
2705
- if ( ! wppa_switch( 'upload_one_only' ) ) {
2706
- if ( $max ) {
2707
- $result .=
 
 
 
2708
  '<div style="font-size:10px;" >' .
2709
  sprintf( _n( 'You may upload %d photo', 'You may upload up to %d photos at once if your browser supports HTML-5 multiple file upload',
2710
  $max,
@@ -2713,14 +2737,14 @@ static $albums_granted;
2713
 
2714
  if ( wppa_opt( 'upload_frontend_minsize' ) ) {
2715
  $minsize = wppa_opt( 'upload_frontend_minsize' );
2716
- $result .=
2717
  '<div style="font-size:10px;" >' .
2718
  sprintf( __( 'Min photo size: %d pixels', 'wp-photo-album-plus' ), $minsize ) .
2719
  '</div>';
2720
  }
2721
  if ( wppa_opt( 'upload_frontend_maxsize' ) ) {
2722
  $maxsize = wppa_opt( 'upload_frontend_maxsize' );
2723
- $result .=
2724
  '<div style="font-size:10px;" >' .
2725
  sprintf( __( 'Max photo size: %d pixels', 'wp-photo-album-plus' ), $maxsize ) .
2726
  '</div>';
@@ -2728,7 +2752,7 @@ static $albums_granted;
2728
  else {
2729
  $maxsize = wppa_check_memory_limit( false );
2730
  if ( is_array( $maxsize ) ) {
2731
- $result .=
2732
  '<div style="font-size:10px;" >' .
2733
  sprintf( __( 'Max photo size: %d x %d (%2.1f MegaPixel)', 'wp-photo-album-plus' ),
2734
  $maxsize['maxx'], $maxsize['maxy'], $maxsize['maxp']/( 1024*1024 )
@@ -2736,20 +2760,41 @@ static $albums_granted;
2736
  '</div>';
2737
  }
2738
  }
2739
- }
2740
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2741
 
2742
  // Copyright notice
2743
  if ( wppa_switch( 'copyright_on' ) ) {
2744
- $result .=
2745
  '<div style="width:100%;clear:both;" >' .
2746
- __( wppa_opt( 'copyright_notice' ), 'wp-photo-album-plus' ) .
2747
  '</div>';
2748
  }
2749
 
 
 
2750
  // Watermark
2751
  if ( wppa_switch( 'watermark_on' ) && ( wppa_switch( 'watermark_user' ) ) ) {
2752
- $result .=
 
 
2753
  '<table' .
2754
  ' class="wppa-watermark wppa-box-text"' .
2755
  ' style="margin:0; border:0; '.wppa_wcs( 'wppa-box-text' ).'"' .
@@ -2800,70 +2845,89 @@ static $albums_granted;
2800
  '</tr>' .
2801
  '</tbody>' .
2802
  '</table>';
 
 
2803
  }
2804
 
 
2805
  // Name
 
 
 
 
 
2806
  if ( wppa_switch( 'name_user' ) ) {
2807
- switch ( wppa_opt( 'newphoto_name_method' ) ) {
2808
- case 'none':
2809
- $expl = '';
2810
- break;
2811
- case '2#005':
2812
- $expl =
2813
- __( 'If you leave this blank, iptc tag 005 (Graphic name) will be used as photoname if available, else the original filename will be used as photo name.',
 
 
 
 
 
 
 
 
 
2814
  'wp-photo-album-plus' );
2815
- break;
2816
- case '2#120':
2817
- $expl =
2818
- __( 'If you leave this blank, iptc tag 120 (Caption) will be used as photoname if available, else the original filename will be used as photo name.',
2819
- 'wp-photo-album-plus' );
2820
- break;
2821
- case 'Photo w#id':
2822
- $expl =
2823
- __( 'If you leave this blank, "Photo photoid" will be used as photo name.',
2824
- 'wp-photo-album-plus' );
2825
- break;
2826
 
2827
- default:
2828
- $expl =
2829
- __( 'If you leave this blank, the original filename will be used as photo name.',
2830
- 'wp-photo-album-plus' );
 
2831
  }
2832
- $result .=
2833
- '<h6>' .
2834
- __( 'Photo name', 'wp-photo-album-plus' ) .
2835
- '</h6>' .
2836
- '<div style="clear:left;font-size:10px;" >' .
2837
- $expl .
2838
- '</div>' .
2839
  '<input' .
 
2840
  ' type="text"' .
2841
  ' class="wppa-box-text"' .
2842
- ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
2843
  ' name="wppa-user-name"' .
2844
- ' />';
 
 
 
2845
  }
 
2846
 
2847
  // Description user fillable ?
2848
  if ( wppa_switch( 'desc_user' ) ) {
 
 
 
 
 
2849
  $desc = wppa_switch( 'apply_newphoto_desc_user' ) ? stripslashes( wppa_opt( 'newphoto_description' ) ) : '';
2850
- $result .=
2851
- '<h6>' .
2852
- __( 'Photo description', 'wp-photo-album-plus' ) .
2853
- '</h6>' .
2854
  '<textarea' .
 
2855
  ' class="wppa-user-textarea wppa-box-text"' .
2856
- ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
2857
  ' name="wppa-user-desc"' .
2858
  ' >' .
2859
  $desc .
2860
  '</textarea>';
 
 
2861
  }
2862
 
2863
  // Predefined desc ?
2864
  elseif ( wppa_switch( 'apply_newphoto_desc_user' ) ) {
 
2865
  $result .=
2866
  '<input' .
 
2867
  ' type="hidden"' .
2868
  ' value="' . esc_attr( wppa_opt( 'newphoto_description' ) ) . '"' .
2869
  ' name="wppa-user-desc"' .
@@ -2874,17 +2938,18 @@ static $albums_granted;
2874
  if ( wppa_switch( 'fe_custom_fields' ) ) {
2875
  for ( $i = '0'; $i < '10' ; $i++ ) {
2876
  if ( wppa_opt( 'custom_caption_'.$i ) ) {
2877
- $result .=
2878
- '<h6>'.
2879
- __( wppa_opt( 'custom_caption_'.$i ), 'wp-photo-album-plus' ) . ': ' .
2880
- ( wppa_switch( 'custom_visible_'.$i ) ? '' : '&nbsp;<small><i>(&nbsp;'.__( 'hidden', 'wp-photo-album-plus' ).'&nbsp;)</i></small>' ) .
2881
- '</h6>' .
2882
- '<input' .
2883
- ' type="text"' .
2884
- ' class="wppa-box-text"' .
2885
- ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
2886
- ' name="wppa-user-custom-'.$i.'"' .
2887
- ' />';
 
2888
  }
2889
  }
2890
  }
@@ -2896,82 +2961,89 @@ static $albums_granted;
2896
  $onc = 'wppaPrevTags(\'wppa-sel-'.$yalb.'-'.$mocc.'\', \'wppa-inp-'.$yalb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$yalb.'-'.$mocc.'\')';
2897
 
2898
  // Open the tag enter area
2899
- $result .= '<div style="clear:both;" >';
2900
 
2901
  // Selection boxes 1..3
2902
  for ( $i = '1'; $i < '4'; $i++ ) {
2903
  if ( wppa_switch( 'up_tagselbox_on_'.$i ) ) {
2904
- $result .=
2905
- '<h6>' .
2906
- __( wppa_opt( 'up_tagselbox_title_'.$i ) ,'wp-photo-album-plus' ) .
2907
- '</h6>' .
2908
- '<select' .
2909
- ' id="wppa-sel-'.$yalb.'-'.$mocc.'-'.$i.'"' .
2910
- ' name="wppa-user-tags-'.$i.'[]"' .
2911
- ( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) .
2912
- ' onchange="'.$onc.'"' .
2913
- ' >';
2914
  if ( wppa_opt( 'up_tagselbox_content_'.$i ) ) { // List of tags supplied
2915
  $tags = explode( ',', trim( wppa_opt( 'up_tagselbox_content_'.$i ), ',' ) );
2916
- $result .= '<option value="" >&nbsp;</option>';
2917
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2918
- $result .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
2919
  }
2920
  }
2921
  else { // All existing tags
2922
  $tags = wppa_get_taglist();
2923
- $result .= '<option value="" >&nbsp;</option>';
2924
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2925
- $result .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
2926
  }
2927
  }
2928
- $result .= '</select><div style="clear:both;" ></div>';
 
 
2929
  }
2930
  }
2931
 
2932
  // New tags
2933
  if ( wppa_switch( 'up_tag_input_on' ) ) {
2934
- $result .= '<h6>' .
2935
- __( wppa_opt( 'up_tag_input_title' ), 'wp-photo-album-plus' ) .
2936
- '</h6>' .
2937
- '<input' .
2938
- ' id="wppa-inp-'.$yalb.'-'.$mocc.'"' .
2939
- ' type="text"' .
2940
- ' class="wppa-box-text "' .
2941
- ' style="padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
2942
- ' name="wppa-new-tags"' .
2943
- ' onchange="'.$onc.'"' .
2944
- ' value="'.trim(wppa_opt('up_tagbox_new'), ',').'"' .
2945
- ' />';
 
 
2946
  }
2947
 
2948
  // Preview area
2949
  if ( wppa_switch( 'up_tag_preview' ) ) {
2950
- $result .= '<h6>' .
2951
- __( 'Preview tags:', 'wp-photo-album-plus' ) .
2952
- ' <small id="wppa-prev-'.$yalb.'-'.$mocc.'"></small>' .
2953
- '</h6>' .
2954
- '<script type="text/javascript" >jQuery( document ).ready(function() {'.$onc.'})</script>';
2955
  }
2956
 
2957
  // Close tag enter area
2958
- $result .= '</div>';
2959
  }
2960
 
2961
  /* The Blogit section */
2962
 
2963
  if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_opt( 'blog_it' ) != '-none-' ) {
2964
- $result .=
2965
- '<div style="margin-top:6px;" >';
2966
 
2967
  // Use can choose to blog it
2968
  if ( wppa_opt( 'blog_it' ) == 'optional' ) {
2969
- $result .=
 
2970
  '<input' .
2971
  ' type="button"' .
2972
  ' value="' . esc_attr( __( 'Blog it?', 'wp-photo-album-plus' ) ) . '"' .
2973
  ' onclick="jQuery(\'#wppa-blogit-'.$yalb.'-'.$mocc.'\').trigger(\'click\')"' .
2974
- ' />' .
 
 
2975
  ' <input' .
2976
  ' type="checkbox"' .
2977
  ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
@@ -2990,7 +3062,8 @@ static $albums_granted;
2990
 
2991
  // Always blog
2992
  else {
2993
- $result .=
 
2994
  '<input' .
2995
  ' type="checkbox"' .
2996
  ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
@@ -2998,16 +3071,17 @@ static $albums_granted;
2998
  ' style="display:none;"' .
2999
  ' checked="checked"' .
3000
  ' />';
3001
-
3002
  }
3003
 
3004
- $result .=
3005
  '<div' .
3006
  ' id="blog-div-'.$yalb.'-'.$mocc.'"' .
3007
  ( wppa_opt( 'blog_it' ) == 'optional' ? ' style="display:none;"' : '' ) .
3008
- ' />' .
 
 
3009
  '<h6>' .
3010
- __( 'Post title:', 'wp-photo-album-plus' ) .
3011
  '</h6>' .
3012
  '<input' .
3013
  ' id="wppa-blogit-title-'.$yalb.'-'.$mocc.'"' .
@@ -3017,45 +3091,57 @@ static $albums_granted;
3017
  ' name="wppa-post-title"' .
3018
  ' />' .
3019
  '<h6>' .
3020
- __( 'Text BEFORE the image:', 'wp-photo-album-plus' ) .
3021
  '</h6>' .
3022
  '<textarea' .
3023
  ' id="wppa-blogit-pretext-'.$yalb.'-'.$mocc.'"' .
3024
  ' name="wppa-blogit-pretext"' .
3025
  ' class=wppa-user-textarea wppa-box-text"' .
3026
- ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3027
  ' >' .
3028
  '</textarea>' .
3029
  '<h6>' .
3030
- __( 'Text AFTER the image:', 'wp-photo-album-plus' ) .
3031
  '</h6>' .
3032
  '<textarea' .
3033
  ' id="wppa-blogit-posttext-'.$yalb.'-'.$mocc.'"' .
3034
  ' name="wppa-blogit-posttext"' .
3035
  ' class=wppa-user-textarea wppa-box-text"' .
3036
- ' style="border:1 px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3037
  '>' .
3038
  '</textarea>' .
3039
- '</div>' .
3040
- '</div>';
 
 
3041
 
3042
  }
3043
 
3044
 
3045
  /* start submit section */
3046
 
3047
- // Onclick submit verify album is known
 
 
 
 
 
 
 
3048
  if ( ! $alb ) {
3049
- $onclick = ' onclick="if ( document.getElementById( \'wppa-upload-album-'.$mocc.'-'.$seqno.'\' ).value == 0 )' .
3050
- ' {alert( \''.esc_js( __( 'Please select an album and try again', 'wp-photo-album-plus' ) ).'\' );return false;}"';
3051
- }
3052
- else {
3053
- $onclick = '';
3054
  }
 
 
 
 
 
3055
 
3056
  // The submit button
3057
  $value = wppa_opt( 'blog_it' ) == 'always' ? esc_attr( __( 'Upload and blog', 'wp-photo-album-plus' ) ) : esc_attr( __( 'Upload photo', 'wp-photo-album-plus' ) );
3058
- $result .=
 
 
3059
  '<div style="height:6px;;clear:both;" ></div>' .
3060
  '<input' .
3061
  ' type="submit"' .
@@ -3069,7 +3155,7 @@ static $albums_granted;
3069
 
3070
  // if ajax: progression bar
3071
  if ( $ajax_upload ) {
3072
- $result .=
3073
  '<div' .
3074
  ' id="progress-'.$yalb.'-'.$mocc.'"' .
3075
  ' class="wppa-progress "' .
@@ -3081,12 +3167,21 @@ static $albums_granted;
3081
  '<div id="message-'.$yalb.'-'.$mocc.'" class="wppa-message" ></div>';
3082
  }
3083
 
 
 
 
3084
  /* End submit section */
3085
 
 
 
 
 
3086
 
3087
  // Done
3088
  $result .= '</form></div>';
3089
 
 
 
3090
  // If ajax upload and from cover or thumbnail area, go display the thumbnails after upload
3091
  if ( $where == 'cover' || $where == 'thumb' ) {
3092
  $url_after_ajax_upload = wppa_get_permalink() . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
@@ -3114,6 +3209,7 @@ static $albums_granted;
3114
  jQuery("#percent-'.$yalb.'-'.$mocc.'").html("");
3115
  },
3116
  uploadProgress: function(event, position, total, percentComplete) {
 
3117
  jQuery("#bar-'.$yalb.'-'.$mocc.'").width(percentComplete+\'%\');
3118
  if ( percentComplete < 95 ) {
3119
  jQuery("#percent-'.$yalb.'-'.$mocc.'").html(percentComplete+\'%\');
@@ -3128,11 +3224,20 @@ static $albums_granted;
3128
  jQuery(".wppa-upload-button").val(wppaUploadButtonText);
3129
  },
3130
  complete: function(response) {
3131
- jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="font-size: 10px;" >\'+response.responseText+\'</span>\' );'.
3132
- ( $where == 'thumb' || $where == 'cover' ? $on_complete : '' ).'
 
 
 
 
 
 
 
3133
  },
3134
  error: function() {
3135
- jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="color: red;" >'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'</span>\' );
 
 
3136
  }
3137
  };
3138
 
@@ -3147,6 +3252,32 @@ static $albums_granted;
3147
  return $result;
3148
  }
3149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3150
  // Frontend edit album info
3151
  function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
3152
 
@@ -3196,7 +3327,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
3196
  'jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . wppa( 'mocc' ) . '\' ).css( \'display\',\'block\' );'. // Show catogory
3197
  'jQuery( \'#_wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide backlink
3198
  '_wppaDoAutocol( ' . wppa( 'mocc' ) . ' )'. // Trigger autocol
3199
- '" style="float:right; cursor:pointer;display:none;">
3200
  ' . __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
3201
  '</a>';
3202
 
@@ -3658,7 +3789,7 @@ global $wpdb;
3658
  '<textarea' .
3659
  ' name="wppa-comment"' .
3660
  ' id="wppa-comment-' . wppa( 'mocc' ) . '"' .
3661
- ' style="height:60px; width:100%; "' .
3662
  '>' .
3663
  esc_textarea( stripslashes( $txt ) ) .
3664
  '</textarea>' .
@@ -3954,7 +4085,7 @@ global $wppa_exif_cache;
3954
  $result .= '<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" >' .
3955
  '<td class="wppa-exif-label wppa-box-text wppa-td" style="'.wppa_wcs( 'wppa-box-text' ).wppa_wcs( 'wppa-td' ).'" >';
3956
 
3957
- $label = wppa_exif_tagname( hexdec( '0x' . substr( $exifline['tag'], 2, 4 ) ), $brand ) . ':';
3958
 
3959
  $result .= esc_js( __( $label ) );
3960
 
@@ -4138,15 +4269,16 @@ function wppa_bestof_html( $args, $widget = true ) {
4138
  'size' => wppa_opt( 'widget_width' ),
4139
  'fontsize' => wppa_opt( 'fontsize_widget_thumb' ),
4140
  'lineheight' => wppa_opt( 'fontsize_widget_thumb' ) * 1.5,
4141
- 'height' => '200'
 
4142
  ) );
4143
 
4144
  // Make args into seperate vars
4145
  extract ( $args );
4146
 
4147
  // Validate args
4148
- if ( ! in_array( $sortby, array ( 'maxratingcount', 'meanrating', 'ratingcount' ) ) ) {
4149
- wppa_dbg_msg ( 'Invalid arg sortby "'.$sortby.'" must be "maxratingcount", "meanrating" or "ratingcount"', 'red', 'force' );
4150
  }
4151
  if ( ! in_array( $display, array ( 'photo', 'owner' ) ) ) {
4152
  wppa_dbg_msg ( 'Invalid arg display "'.$display.'" must be "photo" or "owner"', 'red', 'force' );
@@ -4183,6 +4315,7 @@ function wppa_bestof_html( $args, $widget = true ) {
4183
  if ( $maxratings == 'yes' ) $totalh += $lineheight;
4184
  if ( $meanrat == 'yes' ) $totalh += $lineheight;
4185
  if ( $ratcount == 'yes' ) $totalh += $lineheight;
 
4186
 
4187
  if ( $widget ) $clear = 'clear:both; '; else $clear = '';
4188
  $result .= "\n" .
@@ -4267,16 +4400,21 @@ function wppa_bestof_html( $args, $widget = true ) {
4267
  $result .= sprintf( __( 'Photo by: %s', 'wp-photo-album-plus' ), $data[$id]['user'] ).'<br />';
4268
  if ( $maxratings == 'yes' ) {
4269
  $n = $data[$id]['maxratingcount'];
4270
- $result .= sprintf( _n( '%d max rating', '%d max ratings', $n, 'wp-photo-album-plus' ), $n ).'<br />';
4271
  }
4272
  if ( $ratcount == 'yes' ) {
4273
  $n = $data[$id]['ratingcount'];
4274
- $result .= sprintf( _n( '%d vote', '%d votes', 'wp-photo-album-plus'), $n ).'<br />';
4275
  }
4276
  if ( $meanrat == 'yes' ) {
4277
  $m = $data[$id]['meanrating'];
4278
- $result .= sprintf( __( 'Rating: %4.2f.', 'wp-photo-album-plus' ), $m ).'<br />';
 
 
 
 
4279
  }
 
4280
  $result .= '</div>';
4281
  $result .= '<div style="clear:both" ></div>';
4282
 
@@ -4340,6 +4478,10 @@ function wppa_bestof_html( $args, $widget = true ) {
4340
  $m = $data[$author]['meanrating'];
4341
  $result .= sprintf( __( 'Mean value: %4.2f.', 'wp-photo-album-plus' ), $m ).'<br />';
4342
  }
 
 
 
 
4343
 
4344
  $result .= '</div>';
4345
  $result .= '</li>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.8.01
7
  *
8
  */
9
 
930
  // Add brand specific tagname(s)
931
  $brandfound = false;
932
  foreach( $wppa_supported_camara_brands as $brand ) {
933
+ $brtagnam = trim( wppa_exif_tagname( $tag, $brand, 'brandonly' ), ': ' );
934
  if ( $brtagnam ) {
935
  $options_array[] = array( 'tag' => $tag . $brand, 'desc' => $brtagnam . ' (' . ucfirst( strtolower( $brand ) ) . ')' );
936
  $brandfound = true;
2178
  'jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'block\' );'. // Show backlink
2179
  '_wppaDoAutocol( ' . $mocc . ' )'. // Trigger autocol
2180
  '"' .
2181
+ ' style="float:left;cursor:pointer;"' .
2182
  '> ' .
2183
  ( $alb ? __( 'Create Sub Album', 'wp-photo-album-plus' ) : __( 'Create Album', 'wp-photo-album-plus' ) ) .
2184
  '</a>' .
2194
  'jQuery( \'#_wppa-cr-'.str_replace('.','-',$alb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
2195
  '_wppaDoAutocol( ' . $mocc . ' )'. // Trigger autocol
2196
  '"' .
2197
+ ' style="float:right;cursor:pointer;display:none;padding-right:6px;"' .
2198
  ' >' .
2199
  __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
2200
  '</a>';
2295
 
2296
  function wppa_get_user_upload_html( $xalb, $width, $where = '', $mcr = false ) {
2297
  global $wpdb;
2298
+ global $wppa_supported_photo_extensions;
2299
  global $wppa_supported_video_extensions;
2300
  global $wppa_supported_audio_extensions;
2301
  static $seqno;
2509
 
2510
  // Make the HTML
2511
  $t = $mcr ? 'mcr-' : '';
2512
+ $big = true;
2513
+ if ( wppa( 'in_widget' ) ) $big = false;
2514
+
2515
  $result .=
2516
  '<a' .
2517
  ' id="wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'"' .
2541
  'jQuery( \'#_wppa-up-'.str_replace('.','-',$yalb).'-'.$mocc.'\' ).css( \'display\',\'none\' );'. // Hide backlink
2542
  '_wppaDoAutocol( ' . $mocc . ' )' . // Trigger autocol
2543
  '"' .
2544
+ ' style="float:right; cursor:pointer;display:none;padding-right:6px;' .
2545
  '" >' .
2546
  __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
2547
  '</a>' .
2567
  ' name="wppa-upload-album"' .
2568
  ' value="'.$alb.'"' .
2569
  ' />';
2570
+
2571
+ $head = '';
2572
+ $body = '';
2573
  }
2574
 
2575
  // Array given
2576
  else {
2577
+
2578
+ $head = __( 'Upload to album', 'wp-photo-album-plus' );
2579
+ $body = '';
2580
+
2581
  if ( ! is_array( $alb ) ) {
2582
  $alb = explode( '.', wppa_expand_enum( $alb ) );
2583
  }
2585
  // Can an selection box be displayed?
2586
  if ( ! wppa_opt( 'fe_upload_max_albums' ) || // No limit on number of albums
2587
  wppa_opt( 'fe_upload_max_albums' ) > wppa_get_uploadable_album_count( $alb ) ) { // Below max
2588
+ $body .=
2589
+ '<select' .
2590
+ ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
2591
+ ' name="wppa-upload-album"' .
2592
+ ' style="max-width: 100%;"' .
2593
+ ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
2594
+ ' >' .
2595
+ wppa_album_select_a( array ( 'addpleaseselect' => true,
2596
+ 'checkowner' => true,
2597
+ 'checkupload' => true,
2598
+ 'path' => wppa_switch( 'hier_albsel' ),
2599
+ 'checkarray' => count( $alb ) > 1,
2600
+ 'array' => $alb,
2601
+ ) ) .
2602
+ '</select>' .
2603
+ '<div style="clear:both;" ></div>';
2604
  }
2605
 
2606
  // No, there are too many albums
2607
  else {
2608
+ $body .=
2609
  '<input' .
2610
  ' id="wppa-upload-album-'.$mocc.'-'.$seqno.'"' .
2611
  ' type="number"' .
2612
  ' placeholder="' . esc_attr( __( 'Enter album id', 'wp-photo-album-plus' ) ) . '"' .
2613
  ' name="wppa-upload-album"' .
2614
+ ' style="max-width: 100%;"' .
2615
  ' onchange="jQuery( \'#wppa-sel-'.$yalb.'-'.$mocc.'\' ).trigger( \'onchange\' )"' .
2616
+ ' />';
 
2617
  }
2618
  }
2619
 
2620
+ // If big, init table
2621
+ if ( $big ) {
2622
+ $result .= '<table class="wppa-upload-table" style="max-width:100%;" >';
2623
+ }
2624
+
2625
+ // Album select
2626
+ $result .= wppa_get_dlg_item( $head, $body, $big );
2627
+
2628
+
2629
  $one_only = wppa_switch( 'upload_one_only' );
2630
  $multiple = ! $one_only;
2631
  $on_camera = wppa_switch( 'camera_connect' );
2643
  $accept .= ',.pdf';
2644
  }
2645
 
2646
+
2647
  if ( $one_only ) {
2648
  if ( $on_camera ) {
2649
+ $head = esc_attr( __( 'Select File or Camera', 'wp-photo-album-plus' ) );
 
 
 
 
 
2650
  }
2651
  else {
2652
+ $head = esc_attr( __( 'Select File', 'wp-photo-album-plus' ) );
 
 
 
 
 
2653
  }
2654
  }
2655
  else {
2656
  if ( $on_camera ) {
2657
+ $head = esc_attr( __( 'Select File(s) or Camera', 'wp-photo-album-plus' ) );
 
 
 
 
 
2658
  }
2659
  else {
2660
+ $head = esc_attr( __( 'Select File(s)', 'wp-photo-album-plus' ) );
 
 
 
 
 
2661
  }
2662
  }
 
 
 
2663
 
2664
+ $value = __( 'Browse...', 'wp-photo-album-plus' );
2665
 
2666
  // Save the button text
2667
+ $body =
2668
  '<script>var wppaUploadButtonText="' . esc_js( $value ) . '"</script>' .
2669
 
2670
  // The (hidden) functional button
2683
  '"' .
2684
  ' />';
2685
 
 
 
 
 
 
 
2686
  // The displayed button
2687
+ $body .=
2688
  '<input' .
2689
  ' type="button"' .
2690
+ ' style="max-width:100%;width:auto;margin-top:8px;margin-bottom:8px;padding-left:6px;padding-right:6px;"' .
2691
  ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '-display"' .
2692
  ' class="wppa-upload-button"' .
2693
  ' value="' . $value . '"' .
2694
+ ' onclick="' .
2695
+ 'jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').removeAttr(\'capture\');' .
2696
+ 'jQuery( \'#wppa-user-upload-' . $yalb . '-' . $mocc . '\' ).click();' .
2697
+ '"' .
2698
  '/>';
2699
+ // The camera button for iphone and ipad, if Table II-H15 (Camera connect) is ticked.
2700
+ if ( wppa_is_iphoneoripad() && $on_camera ) {
2701
+ $body .=
2702
+ '<input' .
2703
+ ' type="button"' .
2704
+ ' style="' .
2705
+ 'width:32px;' .
2706
+ 'margin-top:8px;' .
2707
+ 'margin-bottom:8px;' .
2708
+ 'margin-left:12px;' .
2709
+ 'padding-left:6px;' .
2710
+ 'padding-right:6px;' .
2711
+ 'background-image:url(\'' . wppa_get_imgdir() . 'camera16.png\');' .
2712
+ 'background-repeat:no-repeat;' .
2713
+ 'background-position:center;' .
2714
+ '"' .
2715
+ ' id="wppa-user-upload-' . $yalb . '-' . $mocc . '-idisplay"' .
2716
+ ' class="wppa-upload-button"' .
2717
+ ' value="&nbsp;"' .
2718
+ ' onclick="' .
2719
+ 'jQuery(\'#wppa-user-upload-' . $yalb . '-' . $mocc . '\').attr(\'capture\',\'capture\');' .
2720
+ 'jQuery( \'#wppa-user-upload-' . $yalb . '-' . $mocc . '\' ).click();' .
2721
+ '"' .
2722
+ '/>';
2723
+ }
2724
 
2725
  // Explanation
2726
+ if ( wppa_switch( 'upload_one_only' ) ) {
2727
+ $max = 1;
2728
+ }
2729
+ // if ( ! wppa_switch( 'upload_one_only' ) ) {
2730
+ // if ( $max ) {
2731
+ $body .=
2732
  '<div style="font-size:10px;" >' .
2733
  sprintf( _n( 'You may upload %d photo', 'You may upload up to %d photos at once if your browser supports HTML-5 multiple file upload',
2734
  $max,
2737
 
2738
  if ( wppa_opt( 'upload_frontend_minsize' ) ) {
2739
  $minsize = wppa_opt( 'upload_frontend_minsize' );
2740
+ $body .=
2741
  '<div style="font-size:10px;" >' .
2742
  sprintf( __( 'Min photo size: %d pixels', 'wp-photo-album-plus' ), $minsize ) .
2743
  '</div>';
2744
  }
2745
  if ( wppa_opt( 'upload_frontend_maxsize' ) ) {
2746
  $maxsize = wppa_opt( 'upload_frontend_maxsize' );
2747
+ $body .=
2748
  '<div style="font-size:10px;" >' .
2749
  sprintf( __( 'Max photo size: %d pixels', 'wp-photo-album-plus' ), $maxsize ) .
2750
  '</div>';
2752
  else {
2753
  $maxsize = wppa_check_memory_limit( false );
2754
  if ( is_array( $maxsize ) ) {
2755
+ $body .=
2756
  '<div style="font-size:10px;" >' .
2757
  sprintf( __( 'Max photo size: %d x %d (%2.1f MegaPixel)', 'wp-photo-album-plus' ),
2758
  $maxsize['maxx'], $maxsize['maxy'], $maxsize['maxp']/( 1024*1024 )
2760
  '</div>';
2761
  }
2762
  }
2763
+ $supp = $wppa_supported_photo_extensions;
2764
+ $body .=
2765
+ '<div style="font-size:10px;" >' .
2766
+ __( 'You may upload files of type', 'wp-photo-album-plus' ) . ': .' .
2767
+ implode( ', .', $wppa_supported_photo_extensions );
2768
+ if ( $may_video ) {
2769
+ $body .= ', ' . implode( ', .', $wppa_supported_video_extensions );
2770
+ }
2771
+ if ( $may_audio ) {
2772
+ $body .= ', ' . implode( ', .', $wppa_supported_audio_extensions );
2773
+ }
2774
+ if ( wppa_switch( 'enable_pdf' ) && wppa_opt( 'image_magick' ) ) {
2775
+ $body .= ', .pdf';
2776
+ }
2777
+ $body .=
2778
+ '</div>';
2779
+
2780
+ // }
2781
+ // }
2782
 
2783
  // Copyright notice
2784
  if ( wppa_switch( 'copyright_on' ) ) {
2785
+ $body .=
2786
  '<div style="width:100%;clear:both;" >' .
2787
+ __( wppa_opt( 'copyright_notice' ) ) .
2788
  '</div>';
2789
  }
2790
 
2791
+ $result .= wppa_get_dlg_item( $head, $body, $big );
2792
+
2793
  // Watermark
2794
  if ( wppa_switch( 'watermark_on' ) && ( wppa_switch( 'watermark_user' ) ) ) {
2795
+
2796
+ $head = __( 'Watermark', 'wp-photo-album-plus' );
2797
+ $body =
2798
  '<table' .
2799
  ' class="wppa-watermark wppa-box-text"' .
2800
  ' style="margin:0; border:0; '.wppa_wcs( 'wppa-box-text' ).'"' .
2845
  '</tr>' .
2846
  '</tbody>' .
2847
  '</table>';
2848
+
2849
+ $result .= wppa_get_dlg_item( $head, $body, $big );
2850
  }
2851
 
2852
+
2853
  // Name
2854
+ $head = __( 'Name', 'wp-photo-album-plus' );
2855
+ if ( wppa_switch( 'name_user_mandatory' ) ) {
2856
+ $head .= '<sup style="color:red;" >*</sup>';
2857
+ }
2858
+ $body = '';
2859
  if ( wppa_switch( 'name_user' ) ) {
2860
+ if ( wppa_switch( 'name_user_mandatory' ) ) {
2861
+ $expl = '';
2862
+ }
2863
+ else {
2864
+ switch ( wppa_opt( 'newphoto_name_method' ) ) {
2865
+ case 'none':
2866
+ $expl = '';
2867
+ break;
2868
+ case '2#005':
2869
+ $expl =
2870
+ __( 'If you leave this blank, iptc tag 005 (Graphic name) will be used as photoname if available, else the original filename will be used as photo name.',
2871
+ 'wp-photo-album-plus' );
2872
+ break;
2873
+ case '2#120':
2874
+ $expl =
2875
+ __( 'If you leave this blank, iptc tag 120 (Caption) will be used as photoname if available, else the original filename will be used as photo name.',
2876
  'wp-photo-album-plus' );
2877
+ break;
2878
+ case 'Photo w#id':
2879
+ $expl =
2880
+ __( 'If you leave this blank, "Photo photoid" will be used as photo name.',
2881
+ 'wp-photo-album-plus' );
2882
+ break;
 
 
 
 
 
2883
 
2884
+ default:
2885
+ $expl =
2886
+ __( 'If you leave this blank, the original filename will be used as photo name.',
2887
+ 'wp-photo-album-plus' );
2888
+ }
2889
  }
2890
+ $body .=
 
 
 
 
 
 
2891
  '<input' .
2892
+ ' id="wppa-name-user-' . $mocc . '-' . $seqno . '"' .
2893
  ' type="text"' .
2894
  ' class="wppa-box-text"' .
2895
+ ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
2896
  ' name="wppa-user-name"' .
2897
+ ' />' .
2898
+ '<div style="clear:left;font-size:10px;" >' .
2899
+ $expl .
2900
+ '</div>';
2901
  }
2902
+ $result .= wppa_get_dlg_item( $head, $body, $big );
2903
 
2904
  // Description user fillable ?
2905
  if ( wppa_switch( 'desc_user' ) ) {
2906
+
2907
+ $head = __( 'Description', 'wp-photo-album-plus' );
2908
+ if ( wppa_switch( 'desc_user_mandatory' ) ) {
2909
+ $head .= '<sup style="color:red;" >*</sup>';
2910
+ }
2911
  $desc = wppa_switch( 'apply_newphoto_desc_user' ) ? stripslashes( wppa_opt( 'newphoto_description' ) ) : '';
2912
+ $body =
 
 
 
2913
  '<textarea' .
2914
+ ' id="wppa-desc-user-' . $mocc . '-' . $seqno . '"' .
2915
  ' class="wppa-user-textarea wppa-box-text"' .
2916
+ ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
2917
  ' name="wppa-user-desc"' .
2918
  ' >' .
2919
  $desc .
2920
  '</textarea>';
2921
+
2922
+ $result .= wppa_get_dlg_item( $head, $body, $big );
2923
  }
2924
 
2925
  // Predefined desc ?
2926
  elseif ( wppa_switch( 'apply_newphoto_desc_user' ) ) {
2927
+
2928
  $result .=
2929
  '<input' .
2930
+ ' id="wppa-name-user-' . $mocc . '-' . $seqno . '"' .
2931
  ' type="hidden"' .
2932
  ' value="' . esc_attr( wppa_opt( 'newphoto_description' ) ) . '"' .
2933
  ' name="wppa-user-desc"' .
2938
  if ( wppa_switch( 'fe_custom_fields' ) ) {
2939
  for ( $i = '0'; $i < '10' ; $i++ ) {
2940
  if ( wppa_opt( 'custom_caption_'.$i ) ) {
2941
+
2942
+ $head = __( wppa_opt( 'custom_caption_'.$i ) ) .
2943
+ ( wppa_switch( 'custom_visible_'.$i ) ? '' : '&nbsp;<small><i>(&nbsp;'.__( 'hidden', 'wp-photo-album-plus' ).'&nbsp;)</i></small>' );
2944
+ $body =
2945
+ '<input' .
2946
+ ' type="text"' .
2947
+ ' class="wppa-box-text"' .
2948
+ ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
2949
+ ' name="wppa-user-custom-'.$i.'"' .
2950
+ ' />';
2951
+
2952
+ $result .= wppa_get_dlg_item( $head, $body, $big );
2953
  }
2954
  }
2955
  }
2961
  $onc = 'wppaPrevTags(\'wppa-sel-'.$yalb.'-'.$mocc.'\', \'wppa-inp-'.$yalb.'-'.$mocc.'\', \'wppa-upload-album-'.$mocc.'-'.$seqno.'\', \'wppa-prev-'.$yalb.'-'.$mocc.'\')';
2962
 
2963
  // Open the tag enter area
2964
+ // $result .= '<div style="clear:both;" >';
2965
 
2966
  // Selection boxes 1..3
2967
  for ( $i = '1'; $i < '4'; $i++ ) {
2968
  if ( wppa_switch( 'up_tagselbox_on_'.$i ) ) {
2969
+
2970
+ $head = __( wppa_opt( 'up_tagselbox_title_'.$i ) );
2971
+ $head = trim( $head, ': ');
2972
+ $body = '<select' .
2973
+ ' id="wppa-sel-'.$yalb.'-'.$mocc.'-'.$i.'"' .
2974
+ ' name="wppa-user-tags-'.$i.'[]"' .
2975
+ ( wppa_switch( 'up_tagselbox_multi_'.$i ) ? ' multiple' : '' ) .
2976
+ ' onchange="'.$onc.'"' .
2977
+ ' >';
2978
+
2979
  if ( wppa_opt( 'up_tagselbox_content_'.$i ) ) { // List of tags supplied
2980
  $tags = explode( ',', trim( wppa_opt( 'up_tagselbox_content_'.$i ), ',' ) );
2981
+ $body .= '<option value="" >&nbsp;</option>';
2982
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2983
+ $body .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag).'">'.$tag.'</option>';
2984
  }
2985
  }
2986
  else { // All existing tags
2987
  $tags = wppa_get_taglist();
2988
+ $body .= '<option value="" >&nbsp;</option>';
2989
  if ( is_array( $tags ) ) foreach ( $tags as $tag ) {
2990
+ $body .= '<option class="wppa-sel-'.$yalb.'-'.$mocc.'" value="'.urlencode($tag['tag']).'">'.$tag['tag'].'</option>';
2991
  }
2992
  }
2993
+ $body .= '</select><div style="clear:both;" ></div>';
2994
+
2995
+ $result .= wppa_get_dlg_item( $head, $body, $big );
2996
  }
2997
  }
2998
 
2999
  // New tags
3000
  if ( wppa_switch( 'up_tag_input_on' ) ) {
3001
+
3002
+ $head = __( wppa_opt( 'up_tag_input_title' ) );
3003
+ $head = trim( $head, ': ');
3004
+ $body = '<input' .
3005
+ ' id="wppa-inp-'.$yalb.'-'.$mocc.'"' .
3006
+ ' type="text"' .
3007
+ ' class="wppa-box-text "' .
3008
+ ' style="padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3009
+ ' name="wppa-new-tags"' .
3010
+ ' onchange="'.$onc.'"' .
3011
+ ' value="'.trim(wppa_opt('up_tagbox_new'), ',').'"' .
3012
+ ' />';
3013
+
3014
+ $result .= wppa_get_dlg_item( $head, $body, $big );
3015
  }
3016
 
3017
  // Preview area
3018
  if ( wppa_switch( 'up_tag_preview' ) ) {
3019
+ $head = __( 'Preview tags', 'wp-photo-album-plus' );
3020
+ $body = '<span id="wppa-prev-'.$yalb.'-'.$mocc.'"></span>' .
3021
+ '<script type="text/javascript" >jQuery( document ).ready(function() {'.$onc.'})</script>';
3022
+
3023
+ $result .= wppa_get_dlg_item( $head, $body, $big );
3024
  }
3025
 
3026
  // Close tag enter area
3027
+ // $result .= '</div>';
3028
  }
3029
 
3030
  /* The Blogit section */
3031
 
3032
  if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_opt( 'blog_it' ) != '-none-' ) {
3033
+ // $result .=
3034
+ // '<div style="margin-top:6px;" >';
3035
 
3036
  // Use can choose to blog it
3037
  if ( wppa_opt( 'blog_it' ) == 'optional' ) {
3038
+
3039
+ $head =
3040
  '<input' .
3041
  ' type="button"' .
3042
  ' value="' . esc_attr( __( 'Blog it?', 'wp-photo-album-plus' ) ) . '"' .
3043
  ' onclick="jQuery(\'#wppa-blogit-'.$yalb.'-'.$mocc.'\').trigger(\'click\')"' .
3044
+ ' />';
3045
+
3046
+ $head .=
3047
  ' <input' .
3048
  ' type="checkbox"' .
3049
  ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
3062
 
3063
  // Always blog
3064
  else {
3065
+
3066
+ $head =
3067
  '<input' .
3068
  ' type="checkbox"' .
3069
  ' id="wppa-blogit-'.$yalb.'-'.$mocc.'"' .
3071
  ' style="display:none;"' .
3072
  ' checked="checked"' .
3073
  ' />';
 
3074
  }
3075
 
3076
+ $body =
3077
  '<div' .
3078
  ' id="blog-div-'.$yalb.'-'.$mocc.'"' .
3079
  ( wppa_opt( 'blog_it' ) == 'optional' ? ' style="display:none;"' : '' ) .
3080
+ ' >' .
3081
+
3082
+
3083
  '<h6>' .
3084
+ __( 'Post title', 'wp-photo-album-plus' ) .
3085
  '</h6>' .
3086
  '<input' .
3087
  ' id="wppa-blogit-title-'.$yalb.'-'.$mocc.'"' .
3091
  ' name="wppa-post-title"' .
3092
  ' />' .
3093
  '<h6>' .
3094
+ __( 'Text BEFORE the image', 'wp-photo-album-plus' ) .
3095
  '</h6>' .
3096
  '<textarea' .
3097
  ' id="wppa-blogit-pretext-'.$yalb.'-'.$mocc.'"' .
3098
  ' name="wppa-blogit-pretext"' .
3099
  ' class=wppa-user-textarea wppa-box-text"' .
3100
+ ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3101
  ' >' .
3102
  '</textarea>' .
3103
  '<h6>' .
3104
+ __( 'Text AFTER the image', 'wp-photo-album-plus' ) .
3105
  '</h6>' .
3106
  '<textarea' .
3107
  ' id="wppa-blogit-posttext-'.$yalb.'-'.$mocc.'"' .
3108
  ' name="wppa-blogit-posttext"' .
3109
  ' class=wppa-user-textarea wppa-box-text"' .
3110
+ ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3111
  '>' .
3112
  '</textarea>' .
3113
+ '</div>';// .
3114
+
3115
+ $result .= wppa_get_dlg_item( $head, $body, $big );
3116
+ // '</div>';
3117
 
3118
  }
3119
 
3120
 
3121
  /* start submit section */
3122
 
3123
+ // Onclick submit verify required data is present
3124
+ $vfy_album = 'if (jquery( \'#wppa-upload-album-' . $mocc . '-' . $seqno . '\' ).value == 0 ){alert( \''.esc_js( __( 'Please select an album and try again', 'wp-photo-album-plus' ) ).'\' );return false;}';
3125
+ $vfy_name = 'if (jQuery( \'#wppa-name-user-' . $mocc . '-' . $seqno . '\' ).val() == \'\' ){alert( \''.esc_js(__( 'Please enter the name of the photo and try again', 'wp-photo-album-plus' )).'\');return false;}';
3126
+ $vfy_desc = 'if (jQuery( \'#wppa-desc-user-' . $mocc . '-' . $seqno . '\' ).val() == \'\' ){alert( \''.esc_js(__( 'Please enter the description of the photo and try again', 'wp-photo-album-plus' )).'\');return false;}';
3127
+ $vfy_postit = 'if (jQuery( \'#wppa-blogit-'. $yalb . '-' . $mocc . '\' ).prop( \'checked\' ) && jQuery( \'#wppa-blogit-title-' . $yalb . '-' . $mocc . '\' ).val() == \'\' ){alert( \''.esc_js(__( 'Please enter the title of the blogpost and try again', 'wp-photo-album-plus' )).'\');return false;}';
3128
+ $go = 'jQuery(this).css(\'display\', \'none\');';
3129
+
3130
+ $onclick = ' onclick="';
3131
  if ( ! $alb ) {
3132
+ $onclick .= $vfy_album;
 
 
 
 
3133
  }
3134
+ if ( wppa_switch( 'name_user_mandatory' ) ) $onclick .= $vfy_name;
3135
+ if ( wppa_switch( 'desc_user_mandatory' ) ) $onclick .= $vfy_desc;
3136
+ if ( wppa_opt( 'blog_it' ) != '-none-' ) $onclick .= $vfy_postit;
3137
+
3138
+ $onclick .= $go . '"';
3139
 
3140
  // The submit button
3141
  $value = wppa_opt( 'blog_it' ) == 'always' ? esc_attr( __( 'Upload and blog', 'wp-photo-album-plus' ) ) : esc_attr( __( 'Upload photo', 'wp-photo-album-plus' ) );
3142
+
3143
+ $head = '';
3144
+ $body =
3145
  '<div style="height:6px;;clear:both;" ></div>' .
3146
  '<input' .
3147
  ' type="submit"' .
3155
 
3156
  // if ajax: progression bar
3157
  if ( $ajax_upload ) {
3158
+ $body .=
3159
  '<div' .
3160
  ' id="progress-'.$yalb.'-'.$mocc.'"' .
3161
  ' class="wppa-progress "' .
3167
  '<div id="message-'.$yalb.'-'.$mocc.'" class="wppa-message" ></div>';
3168
  }
3169
 
3170
+ $result .= wppa_get_dlg_item( $head, $body, $big );
3171
+
3172
+
3173
  /* End submit section */
3174
 
3175
+ // End table on wide dieplays
3176
+ if ( $big ) {
3177
+ $result .= '</table>';
3178
+ }
3179
 
3180
  // Done
3181
  $result .= '</form></div>';
3182
 
3183
+
3184
+
3185
  // If ajax upload and from cover or thumbnail area, go display the thumbnails after upload
3186
  if ( $where == 'cover' || $where == 'thumb' ) {
3187
  $url_after_ajax_upload = wppa_get_permalink() . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
3209
  jQuery("#percent-'.$yalb.'-'.$mocc.'").html("");
3210
  },
3211
  uploadProgress: function(event, position, total, percentComplete) {
3212
+ jQuery("#bar-'.$yalb.'-'.$mocc.'").css(\'backgroundColor\',\'#7F7\');
3213
  jQuery("#bar-'.$yalb.'-'.$mocc.'").width(percentComplete+\'%\');
3214
  if ( percentComplete < 95 ) {
3215
  jQuery("#percent-'.$yalb.'-'.$mocc.'").html(percentComplete+\'%\');
3224
  jQuery(".wppa-upload-button").val(wppaUploadButtonText);
3225
  },
3226
  complete: function(response) {
3227
+ if (response.responseText.indexOf(\''.__( 'Upload failed', 'wp-photo-album-plus' ).'\')!=-1) {
3228
+ jQuery("#bar-'.$yalb.'-'.$mocc.'").css(\'backgroundColor\',\'#F77\');
3229
+ jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\''.__('Failed!', 'wp-photo-album-plus').'\');
3230
+ jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="font-size: 10px;" >\'+response.responseText+\'</span>\' );
3231
+ }
3232
+ else {
3233
+ jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="font-size: 10px;" >\'+response.responseText+\'</span>\' );' .
3234
+ ( $where == 'thumb' || $where == 'cover' ? $on_complete : '' ) . '
3235
+ }
3236
  },
3237
  error: function() {
3238
+ jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="color: red;" >'.__( 'Server error.', 'wp-photo-album-plus' ).'</span>\' );
3239
+ jQuery("#bar-'.$yalb.'-'.$mocc.'").css(\'backgroundColor\',\'#F77\');
3240
+ jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\''.__('Failed!', 'wp-photo-album-plus').'\');
3241
  }
3242
  };
3243
 
3252
  return $result;
3253
  }
3254
 
3255
+
3256
+ // Dialog item for fe upload dialog. Makes difference betwen slall layut (widget) and 'box'(shortcode) layout.
3257
+ function wppa_get_dlg_item( $head, $body, $big ) {
3258
+
3259
+ if ( ! $head && ! $body ) {
3260
+ return '';
3261
+ }
3262
+
3263
+ if ( $big ) {
3264
+ $result = '<tr class="wppa-upload-tr" >
3265
+ <th class="wppa-upload-th" >' .
3266
+ $head .
3267
+ '</th>
3268
+ <td class="wppa-upload-td" >' .
3269
+ $body .
3270
+ '</td>
3271
+ </tr>';
3272
+ }
3273
+ else {
3274
+ $result = '<h6>' . $head . '</h6>' .
3275
+ '<div>' . $body . '</div>';
3276
+ }
3277
+
3278
+ return $result;
3279
+ }
3280
+
3281
  // Frontend edit album info
3282
  function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
3283
 
3327
  'jQuery( \'#wppa-cats-' . str_replace('.','-',$alb) . '-' . wppa( 'mocc' ) . '\' ).css( \'display\',\'block\' );'. // Show catogory
3328
  'jQuery( \'#_wppa-ea-'.str_replace('.','-',$alb).'-'.wppa( 'mocc' ).'\' ).css( \'display\',\'none\' );'. // Hide backlink
3329
  '_wppaDoAutocol( ' . wppa( 'mocc' ) . ' )'. // Trigger autocol
3330
+ '" style="float:right; cursor:pointer;display:none;padding-right:6px;">
3331
  ' . __( wppa_opt( 'close_text' ), 'wp-photo-album-plus' ) .
3332
  '</a>';
3333
 
3789
  '<textarea' .
3790
  ' name="wppa-comment"' .
3791
  ' id="wppa-comment-' . wppa( 'mocc' ) . '"' .
3792
+ ' style="height:60px; width:98%; "' .
3793
  '>' .
3794
  esc_textarea( stripslashes( $txt ) ) .
3795
  '</textarea>' .
4085
  $result .= '<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none;" >' .
4086
  '<td class="wppa-exif-label wppa-box-text wppa-td" style="'.wppa_wcs( 'wppa-box-text' ).wppa_wcs( 'wppa-td' ).'" >';
4087
 
4088
+ $label = wppa_exif_tagname( $exifline['tag'], $brand ) . ':';
4089
 
4090
  $result .= esc_js( __( $label ) );
4091
 
4269
  'size' => wppa_opt( 'widget_width' ),
4270
  'fontsize' => wppa_opt( 'fontsize_widget_thumb' ),
4271
  'lineheight' => wppa_opt( 'fontsize_widget_thumb' ) * 1.5,
4272
+ 'height' => '200',
4273
+ 'totvalue' => '',
4274
  ) );
4275
 
4276
  // Make args into seperate vars
4277
  extract ( $args );
4278
 
4279
  // Validate args
4280
+ if ( ! in_array( $sortby, array ( 'maxratingcount', 'meanrating', 'ratingcount', 'totvalue' ) ) ) {
4281
+ wppa_dbg_msg ( 'Invalid arg sortby "'.$sortby.'" must be "maxratingcount", "meanrating", "ratingcount" or "totvalue"', 'red', 'force' );
4282
  }
4283
  if ( ! in_array( $display, array ( 'photo', 'owner' ) ) ) {
4284
  wppa_dbg_msg ( 'Invalid arg display "'.$display.'" must be "photo" or "owner"', 'red', 'force' );
4315
  if ( $maxratings == 'yes' ) $totalh += $lineheight;
4316
  if ( $meanrat == 'yes' ) $totalh += $lineheight;
4317
  if ( $ratcount == 'yes' ) $totalh += $lineheight;
4318
+ if ( $totvalue == 'yes' ) $totalh += $lineheight;
4319
 
4320
  if ( $widget ) $clear = 'clear:both; '; else $clear = '';
4321
  $result .= "\n" .
4400
  $result .= sprintf( __( 'Photo by: %s', 'wp-photo-album-plus' ), $data[$id]['user'] ).'<br />';
4401
  if ( $maxratings == 'yes' ) {
4402
  $n = $data[$id]['maxratingcount'];
4403
+ $result .= sprintf( _n( '%d max rating', '%d max ratings', $n, 'wp-photo-album-plus' ), $n ) . '<br />';
4404
  }
4405
  if ( $ratcount == 'yes' ) {
4406
  $n = $data[$id]['ratingcount'];
4407
+ $result .= sprintf( _n( '%d vote', '%d votes', 'wp-photo-album-plus'), $n ) . '<br />';
4408
  }
4409
  if ( $meanrat == 'yes' ) {
4410
  $m = $data[$id]['meanrating'];
4411
+ $result .= sprintf( __( 'Rating: %4.2f.', 'wp-photo-album-plus' ), $m ) . '<br />';
4412
+ }
4413
+ if ( $totvalue == 'yes' ) {
4414
+ $t = $data[$id]['totvalue'];
4415
+ $result .= sprintf( __( 'Total rating: %d', 'wp-photo-album-plus' ), $t ) . '<br />';
4416
  }
4417
+
4418
  $result .= '</div>';
4419
  $result .= '<div style="clear:both" ></div>';
4420
 
4478
  $m = $data[$author]['meanrating'];
4479
  $result .= sprintf( __( 'Mean value: %4.2f.', 'wp-photo-album-plus' ), $m ).'<br />';
4480
  }
4481
+ if ( $totvalue == 'yes' ) {
4482
+ $t = $data[$author]['totvalue'];
4483
+ $result .= sprintf( __( 'Total rating: %d', 'wp-photo-album-plus' ), $t ) . '<br />';
4484
+ }
4485
 
4486
  $result .= '</div>';
4487
  $result .= '</li>';
wppa-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -197,14 +197,13 @@ global $wppa_session;
197
  $value .= ' ' . __('with iptc tag:', 'wp-photo-album-plus') . ' <b>' . __($label, 'wp-photo-album-plus') . '</b> ' . __('with content:', 'wp-photo-album-plus') .' <b>' . $ss_data['3'] . '</b>';
198
  break;
199
  case 'e':
200
- // $label = $wpdb->get_var( $wpdb->prepare( "SELECT `description` FROM `" . WPPA_EXIF . "` WHERE `tag` = %s AND `photo` = '0'", str_replace( 'H', '#', $ss_data['2'] ) ) );
201
- $tag = substr( $ss_data[2], 2, 4 );
202
  $brand = substr( $ss_data[2], 6 );
203
  if ( $brand ) {
204
- $label = wppa_exif_tagname( hexdec( $tag ), $brand, 'brandonly' ) . ' ('. ucfirst( strtolower( $brand ) ) .')';
205
  }
206
  else {
207
- $label = wppa_exif_tagname( hexdec( $tag ) );
208
  }
209
  $label = trim( $label, ':' );
210
  $value .= ' ' . __('with exif tag:', 'wp-photo-album-plus') . ' <b>' . __($label, 'wp-photo-album-plus') . '</b> ' . __('with content:', 'wp-photo-album-plus') .' <b>' . $ss_data['3'] . '</b>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
+ * Version 6.8.01
7
  *
8
  */
9
 
197
  $value .= ' ' . __('with iptc tag:', 'wp-photo-album-plus') . ' <b>' . __($label, 'wp-photo-album-plus') . '</b> ' . __('with content:', 'wp-photo-album-plus') .' <b>' . $ss_data['3'] . '</b>';
198
  break;
199
  case 'e':
200
+ $tag = substr( $ss_data[2], 0, 1 ) . '#' . substr( $ss_data[2], 2, 4 );
 
201
  $brand = substr( $ss_data[2], 6 );
202
  if ( $brand ) {
203
+ $label = wppa_exif_tagname( $tag, $brand, 'brandonly' ) . ' ('. ucfirst( strtolower( $brand ) ) .')';
204
  }
205
  else {
206
+ $label = wppa_exif_tagname( $tag );
207
  }
208
  $label = trim( $label, ':' );
209
  $value .= ' ' . __('with exif tag:', 'wp-photo-album-plus') . ' <b>' . __($label, 'wp-photo-album-plus') . '</b> ' . __('with content:', 'wp-photo-album-plus') .' <b>' . $ss_data['3'] . '</b>';
wppa-exif-iptc-common.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
- * version 6.8.00
7
  *
8
  *
9
  */
@@ -159,11 +159,14 @@ global $wppa_exif_cache;
159
  }
160
 
161
  // Remove untranslated
162
- $pos = strpos($temp, 'E#');
163
- while ( $pos !== false ) {
164
- $tmp = substr( $temp, 0, $pos ) . '<span title="' . esc_attr( __( 'No data', 'wp-photo-album-plus' ) ) . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>' . substr( $temp, $pos+6 );
165
- $temp = $tmp;
166
- $pos = strpos($temp, 'E#');
 
 
 
167
  }
168
 
169
  // Return result
@@ -173,103 +176,128 @@ global $wppa_exif_cache;
173
  function wppa_format_exif( $tag, $data, $brand = '' ) {
174
  global $wppa_exif_error_output;
175
 
176
- if ( $data !== '' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  switch ( $tag ) {
178
 
179
  case 'E#0001': // InteropIndex / CanonCameraSettings (Canon)
180
- switch( $brand ) {
181
- case 'CANON': // CanonCameraSettings (Canon)
182
- $result = $data;
183
- return $result;
184
- break;
185
- default: // InteropIndex
186
- switch( $data ) {
187
- case 'R03': $result = __( 'R03 - DCF option file (Adobe RGB)', 'wp-photo-album-plus' ); break;
188
- case 'R98': $result = __( 'R98 - DCF basic file (sRGB)', 'wp-photo-album-plus' ); break;
189
- case 'THM': $result = __( 'THM - DCF thumbnail file', 'wp-photo-album-plus' ); break;
190
- default: $result = __( 'Undefined', 'wp-photo-album-plus' );
191
- }
192
- return $result;
193
  }
194
- break;
 
 
 
 
 
 
 
 
195
 
196
  case 'E#0002': // CanonFocalLength / DeviceType
197
- switch( $brand ) {
198
- case 'SAMSUNG': // DeviceType
199
- switch( $data ) {
200
- case 0x1000: $result = 'Compact Digital Camera'; break;
201
- case 0x2000: $result = 'High-end NX Camera'; break;
202
- case 0x3000: $result = 'HXM Video Camera'; break;
203
- case 0x12000: $result = 'Cell Phone'; break;
204
- case 0x300000: $result = 'SMX Video Camera'; break;
205
- default: $result = $data;
 
 
 
 
 
 
 
 
 
 
206
  }
207
- return $result;
208
- break;
 
 
 
 
 
 
 
 
 
209
 
210
- default:
211
- $result = $data;
212
- return $data;
213
- break;
214
  }
215
- break;
216
 
217
  case 'E#0003': // CanonFlashInfo? / SamsungModelID
218
- switch( $brand ) {
219
- case 'SAMSUNG': // SamsungModelID
220
- switch( $data ) {
221
- case 0x100101c: $result = 'NX10'; break;
222
- case 0x1001226: $result = 'HMX-S15BP'; break;
223
- case 0x1001233: $result = 'HMX-Q10'; break;
224
- case 0x1001234: $result = 'HMX-H304'; break;
225
- case 0x100130c: $result = 'NX100'; break;
226
- case 0x1001327: $result = 'NX11'; break;
227
- case 0x170104b: $result = 'ES65, ES67 / VLUU ES65, ES67 / SL50'; break;
228
- case 0x170104e: $result = 'ES70, ES71 / VLUU ES70, ES71 / SL600'; break;
229
- case 0x1701052: $result = 'ES73 / VLUU ES73 / SL605'; break;
230
- case 0x1701055: $result = 'ES25, ES27 / VLUU ES25, ES27 / SL45'; break;
231
- case 0x1701300: $result = 'ES28 / VLUU ES28'; break;
232
- case 0x1701303: $result = 'ES74,ES75,ES78 / VLUU ES75,ES78'; break;
233
- case 0x2001046: $result = 'PL150 / VLUU PL150 / TL210 / PL151'; break;
234
- case 0x2001048: $result = 'PL100 / TL205 / VLUU PL100 / PL101'; break;
235
- case 0x2001311: $result = 'PL120,PL121 / VLUU PL120,PL121'; break;
236
- case 0x2001315: $result = 'PL170,PL171 / VLUUPL170,PL171'; break;
237
- case 0x200131e: $result = 'PL210, PL211 / VLUU PL210, PL211'; break;
238
- case 0x2701317: $result = 'PL20,PL21 / VLUU PL20,PL21'; break;
239
- case 0x2a0001b: $result = 'WP10 / VLUU WP10 / AQ100'; break;
240
- case 0x3000000: $result = 'Various Models (0x3000000)'; break;
241
- case 0x3a00018: $result = 'Various Models (0x3a00018)'; break;
242
- case 0x400101f: $result = 'ST1000 / ST1100 / VLUU ST1000 / CL65'; break;
243
- case 0x4001022: $result = 'ST550 / VLUU ST550 / TL225'; break;
244
- case 0x4001025: $result = 'Various Models (0x4001025)'; break;
245
- case 0x400103e: $result = 'VLUU ST5500, ST5500, CL80'; break;
246
- case 0x4001041: $result = 'VLUU ST5000, ST5000, TL240'; break;
247
- case 0x4001043: $result = 'ST70 / VLUU ST70 / ST71'; break;
248
- case 0x400130a: $result = 'Various Models (0x400130a)'; break;
249
- case 0x400130e: $result = 'ST90,ST91 / VLUU ST90,ST91'; break;
250
- case 0x4001313: $result = 'VLUU ST95, ST95'; break;
251
- case 0x4a00015: $result = 'VLUU ST60'; break;
252
- case 0x4a0135b: $result = 'ST30, ST65 / VLUU ST65 / ST67'; break;
253
- case 0x5000000: $result = 'Various Models (0x5000000)'; break;
254
- case 0x5001038: $result = 'Various Models (0x5001038)'; break;
255
- case 0x500103a: $result = 'WB650 / VLUU WB650 / WB660'; break;
256
- case 0x500103c: $result = 'WB600 / VLUU WB600 / WB610'; break;
257
- case 0x500133e: $result = 'WB150 / WB150F / WB152 / WB152F / WB151'; break;
258
- case 0x5a0000f: $result = 'WB5000 / HZ25W'; break;
259
- case 0x6001036: $result = 'EX1'; break;
260
- case 0x700131c: $result = 'VLUU SH100, SH100'; break;
261
- case 0x27127002: $result = 'SMX-C20N'; break;
262
- default: $result = $data;
263
- }
264
- return $result;
265
- break;
266
 
267
- default:
268
- $result = $data;
269
- return $data;
270
- break;
271
  }
272
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
 
274
  case 'E#0004': // CanonShotInfo / Quality (Nikon)
275
  case 'E#0005': // CanonPanorama / WhiteBalance (Nikon)
@@ -280,379 +308,395 @@ global $wppa_exif_error_output;
280
  case 'E#000A': // UnknownD30 (Canon)
281
  case 'E#000B': // WhiteBalanceFineTune (Nikon)
282
  case 'E#000C': // SerialNumber (Canon) / WB_RBLevels (Nikon)
 
 
283
  case 'E#000D': // CanonCameraInfo / ProgramShift (Nikon)
 
 
 
 
 
284
  case 'E#000E': // CanonFileLength / ExposureDifference (Nikon)
 
 
 
 
 
285
  case 'E#000F': // CustomFunctions (Canon) / ISOSelection (Nikon)
286
- $result = $data;
287
  return $result;
288
- break;
289
 
290
  case 'E#0010': // CanonModelID (Canon) / DataDump (Nikon)
291
- switch( $brand ) {
292
- case 'CANON':
293
- $data = dechex( $data );
294
- switch( $data ) {
295
- case '1010000': $result = 'PowerShot A30'; break;
296
- case '1040000': $result = 'PowerShot S300 / Digital IXUS 300 / IXY Digital 300'; break;
297
- case '1060000': $result = 'PowerShot A20'; break;
298
- case '1080000': $result = 'PowerShot A10'; break;
299
- case '1090000': $result = 'PowerShot S110 / Digital IXUS v / IXY Digital 200'; break;
300
- case '1100000': $result = 'PowerShot G2'; break;
301
- case '1110000': $result = 'PowerShot S40'; break;
302
- case '1120000': $result = 'PowerShot S30'; break;
303
- case '1130000': $result = 'PowerShot A40'; break;
304
- case '1140000': $result = 'EOS D30'; break;
305
- case '1150000': $result = 'PowerShot A100'; break;
306
- case '1160000': $result = 'PowerShot S200 / Digital IXUS v2 / IXY Digital 200a'; break;
307
- case '1170000': $result = 'PowerShot A200'; break;
308
- case '1180000': $result = 'PowerShot S330 / Digital IXUS 330 / IXY Digital 300a'; break;
309
- case '1190000': $result = 'PowerShot G3'; break;
310
- case '1210000': $result = 'PowerShot S45'; break;
311
- case '1230000': $result = 'PowerShot SD100 / Digital IXUS II / IXY Digital 30'; break;
312
- case '1240000': $result = 'PowerShot S230 / Digital IXUS v3 / IXY Digital 320'; break;
313
- case '1250000': $result = 'PowerShot A70'; break;
314
- case '1260000': $result = 'PowerShot A60'; break;
315
- case '1270000': $result = 'PowerShot S400 / Digital IXUS 400 / IXY Digital 400'; break;
316
- case '1290000': $result = 'PowerShot G5'; break;
317
- case '1300000': $result = 'PowerShot A300'; break;
318
- case '1310000': $result = 'PowerShot S50'; break;
319
- case '1340000': $result = 'PowerShot A80'; break;
320
- case '1350000': $result = 'PowerShot SD10 / Digital IXUS i / IXY Digital L'; break;
321
- case '1360000': $result = 'PowerShot S1 IS'; break;
322
- case '1370000': $result = 'PowerShot Pro1'; break;
323
- case '1380000': $result = 'PowerShot S70'; break;
324
- case '1390000': $result = 'PowerShot S60'; break;
325
- case '1400000': $result = 'PowerShot G6'; break;
326
- case '1410000': $result = 'PowerShot S500 / Digital IXUS 500 / IXY Digital 500'; break;
327
- case '1420000': $result = 'PowerShot A75'; break;
328
- case '1440000': $result = 'PowerShot SD110 / Digital IXUS IIs / IXY Digital 30a'; break;
329
- case '1450000': $result = 'PowerShot A400'; break;
330
- case '1470000': $result = 'PowerShot A310'; break;
331
- case '1490000': $result = 'PowerShot A85'; break;
332
- case '1520000': $result = 'PowerShot S410 / Digital IXUS 430 / IXY Digital 450'; break;
333
- case '1530000': $result = 'PowerShot A95'; break;
334
- case '1540000': $result = 'PowerShot SD300 / Digital IXUS 40 / IXY Digital 50'; break;
335
- case '1550000': $result = 'PowerShot SD200 / Digital IXUS 30 / IXY Digital 40'; break;
336
- case '1560000': $result = 'PowerShot A520'; break;
337
- case '1570000': $result = 'PowerShot A510'; break;
338
- case '1590000': $result = 'PowerShot SD20 / Digital IXUS i5 / IXY Digital L2'; break;
339
- case '1640000': $result = 'PowerShot S2 IS'; break;
340
- case '1650000': $result = 'PowerShot SD430 / Digital IXUS Wireless / IXY Digital Wireless'; break;
341
- case '1660000': $result = 'PowerShot SD500 / Digital IXUS 700 / IXY Digital 600'; break;
342
- case '1668000': $result = 'EOS D60'; break;
343
- case '1700000': $result = 'PowerShot SD30 / Digital IXUS i Zoom / IXY Digital L3'; break;
344
- case '1740000': $result = 'PowerShot A430'; break;
345
- case '1750000': $result = 'PowerShot A410'; break;
346
- case '1760000': $result = 'PowerShot S80'; break;
347
- case '1780000': $result = 'PowerShot A620'; break;
348
- case '1790000': $result = 'PowerShot A610'; break;
349
- case '1800000': $result = 'PowerShot SD630 / Digital IXUS 65 / IXY Digital 80'; break;
350
- case '1810000': $result = 'PowerShot SD450 / Digital IXUS 55 / IXY Digital 60'; break;
351
- case '1820000': $result = 'PowerShot TX1'; break;
352
- case '1870000': $result = 'PowerShot SD400 / Digital IXUS 50 / IXY Digital 55'; break;
353
- case '1880000': $result = 'PowerShot A420'; break;
354
- case '1890000': $result = 'PowerShot SD900 / Digital IXUS 900 Ti / IXY Digital 1000'; break;
355
- case '1900000': $result = 'PowerShot SD550 / Digital IXUS 750 / IXY Digital 700'; break;
356
- case '1920000': $result = 'PowerShot A700'; break;
357
- case '1940000': $result = 'PowerShot SD700 IS / Digital IXUS 800 IS / IXY Digital 800 IS'; break;
358
- case '1950000': $result = 'PowerShot S3 IS'; break;
359
- case '1960000': $result = 'PowerShot A540'; break;
360
- case '1970000': $result = 'PowerShot SD600 / Digital IXUS 60 / IXY Digital 70'; break;
361
- case '1980000': $result = 'PowerShot G7'; break;
362
- case '1990000': $result = 'PowerShot A530'; break;
363
- case '2000000': $result = 'PowerShot SD800 IS / Digital IXUS 850 IS / IXY Digital 900 IS'; break;
364
- case '2010000': $result = 'PowerShot SD40 / Digital IXUS i7 / IXY Digital L4'; break;
365
- case '2020000': $result = 'PowerShot A710 IS'; break;
366
- case '2030000': $result = 'PowerShot A640'; break;
367
- case '2040000': $result = 'PowerShot A630'; break;
368
- case '2090000': $result = 'PowerShot S5 IS'; break;
369
- case '2100000': $result = 'PowerShot A460'; break;
370
- case '2120000': $result = 'PowerShot SD850 IS / Digital IXUS 950 IS / IXY Digital 810 IS'; break;
371
- case '2130000': $result = 'PowerShot A570 IS'; break;
372
- case '2140000': $result = 'PowerShot A560'; break;
373
- case '2150000': $result = 'PowerShot SD750 / Digital IXUS 75 / IXY Digital 90'; break;
374
- case '2160000': $result = 'PowerShot SD1000 / Digital IXUS 70 / IXY Digital 10'; break;
375
- case '2180000': $result = 'PowerShot A550'; break;
376
- case '2190000': $result = 'PowerShot A450'; break;
377
- case '2230000': $result = 'PowerShot G9'; break;
378
- case '2240000': $result = 'PowerShot A650 IS'; break;
379
- case '2260000': $result = 'PowerShot A720 IS'; break;
380
- case '2290000': $result = 'PowerShot SX100 IS'; break;
381
- case '2300000': $result = 'PowerShot SD950 IS / Digital IXUS 960 IS / IXY Digital 2000 IS'; break;
382
- case '2310000': $result = 'PowerShot SD870 IS / Digital IXUS 860 IS / IXY Digital 910 IS'; break;
383
- case '2320000': $result = 'PowerShot SD890 IS / Digital IXUS 970 IS / IXY Digital 820 IS'; break;
384
- case '2360000': $result = 'PowerShot SD790 IS / Digital IXUS 90 IS / IXY Digital 95 IS'; break;
385
- case '2370000': $result = 'PowerShot SD770 IS / Digital IXUS 85 IS / IXY Digital 25 IS'; break;
386
- case '2380000': $result = 'PowerShot A590 IS'; break;
387
- case '2390000': $result = 'PowerShot A580'; break;
388
- case '2420000': $result = 'PowerShot A470'; break;
389
- case '2430000': $result = 'PowerShot SD1100 IS / Digital IXUS 80 IS / IXY Digital 20 IS'; break;
390
- case '2460000': $result = 'PowerShot SX1 IS'; break;
391
- case '2470000': $result = 'PowerShot SX10 IS'; break;
392
- case '2480000': $result = 'PowerShot A1000 IS'; break;
393
- case '2490000': $result = 'PowerShot G10'; break;
394
- case '2510000': $result = 'PowerShot A2000 IS'; break;
395
- case '2520000': $result = 'PowerShot SX110 IS'; break;
396
- case '2530000': $result = 'PowerShot SD990 IS / Digital IXUS 980 IS / IXY Digital 3000 IS'; break;
397
- case '2540000': $result = 'PowerShot SD880 IS / Digital IXUS 870 IS / IXY Digital 920 IS'; break;
398
- case '2550000': $result = 'PowerShot E1'; break;
399
- case '2560000': $result = 'PowerShot D10'; break;
400
- case '2570000': $result = 'PowerShot SD960 IS / Digital IXUS 110 IS / IXY Digital 510 IS'; break;
401
- case '2580000': $result = 'PowerShot A2100 IS'; break;
402
- case '2590000': $result = 'PowerShot A480'; break;
403
- case '2600000': $result = 'PowerShot SX200 IS'; break;
404
- case '2610000': $result = 'PowerShot SD970 IS / Digital IXUS 990 IS / IXY Digital 830 IS'; break;
405
- case '2620000': $result = 'PowerShot SD780 IS / Digital IXUS 100 IS / IXY Digital 210 IS'; break;
406
- case '2630000': $result = 'PowerShot A1100 IS'; break;
407
- case '2640000': $result = 'PowerShot SD1200 IS / Digital IXUS 95 IS / IXY Digital 110 IS'; break;
408
- case '2700000': $result = 'PowerShot G11'; break;
409
- case '2710000': $result = 'PowerShot SX120 IS'; break;
410
- case '2720000': $result = 'PowerShot S90'; break;
411
- case '2750000': $result = 'PowerShot SX20 IS'; break;
412
- case '2760000': $result = 'PowerShot SD980 IS / Digital IXUS 200 IS / IXY Digital 930 IS'; break;
413
- case '2770000': $result = 'PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS'; break;
414
- case '2800000': $result = 'PowerShot A495'; break;
415
- case '2810000': $result = 'PowerShot A490'; break;
416
- case '2820000': $result = 'PowerShot A3100/A3150 IS'; break;
417
- case '2830000': $result = 'PowerShot A3000 IS'; break;
418
- case '2840000': $result = 'PowerShot SD1400 IS / IXUS 130 / IXY 400F'; break;
419
- case '2850000': $result = 'PowerShot SD1300 IS / IXUS 105 / IXY 200F'; break;
420
- case '2860000': $result = 'PowerShot SD3500 IS / IXUS 210 / IXY 10S'; break;
421
- case '2870000': $result = 'PowerShot SX210 IS'; break;
422
- case '2880000': $result = 'PowerShot SD4000 IS / IXUS 300 HS / IXY 30S'; break;
423
- case '2890000': $result = 'PowerShot SD4500 IS / IXUS 1000 HS / IXY 50S'; break;
424
- case '2920000': $result = 'PowerShot G12'; break;
425
- case '2930000': $result = 'PowerShot SX30 IS'; break;
426
- case '2940000': $result = 'PowerShot SX130 IS'; break;
427
- case '2950000': $result = 'PowerShot S95'; break;
428
- case '2980000': $result = 'PowerShot A3300 IS'; break;
429
- case '2990000': $result = 'PowerShot A3200 IS'; break;
430
- case '3000000': $result = 'PowerShot ELPH 500 HS / IXUS 310 HS / IXY 31S'; break;
431
- case '3010000': $result = 'PowerShot Pro90 IS'; break;
432
- case '3010001': $result = 'PowerShot A800'; break;
433
- case '3020000': $result = 'PowerShot ELPH 100 HS / IXUS 115 HS / IXY 210F'; break;
434
- case '3030000': $result = 'PowerShot SX230 HS'; break;
435
- case '3040000': $result = 'PowerShot ELPH 300 HS / IXUS 220 HS / IXY 410F'; break;
436
- case '3050000': $result = 'PowerShot A2200'; break;
437
- case '3060000': $result = 'PowerShot A1200'; break;
438
- case '3070000': $result = 'PowerShot SX220 HS'; break;
439
- case '3080000': $result = 'PowerShot G1 X'; break;
440
- case '3090000': $result = 'PowerShot SX150 IS'; break;
441
- case '3100000': $result = 'PowerShot ELPH 510 HS / IXUS 1100 HS / IXY 51S'; break;
442
- case '3110000': $result = 'PowerShot S100 (new)'; break;
443
- case '3120000': $result = 'PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F'; break;
444
- case '3130000': $result = 'PowerShot SX40 HS'; break;
445
- case '3140000': $result = 'IXY 32S'; break;
446
- case '3160000': $result = 'PowerShot A1300'; break;
447
- case '3170000': $result = 'PowerShot A810'; break;
448
- case '3180000': $result = 'PowerShot ELPH 320 HS / IXUS 240 HS / IXY 420F'; break;
449
- case '3190000': $result = 'PowerShot ELPH 110 HS / IXUS 125 HS / IXY 220F'; break;
450
- case '3200000': $result = 'PowerShot D20'; break;
451
- case '3210000': $result = 'PowerShot A4000 IS'; break;
452
- case '3220000': $result = 'PowerShot SX260 HS'; break;
453
- case '3230000': $result = 'PowerShot SX240 HS'; break;
454
- case '3240000': $result = 'PowerShot ELPH 530 HS / IXUS 510 HS / IXY 1'; break;
455
- case '3250000': $result = 'PowerShot ELPH 520 HS / IXUS 500 HS / IXY 3'; break;
456
- case '3260000': $result = 'PowerShot A3400 IS'; break;
457
- case '3270000': $result = 'PowerShot A2400 IS'; break;
458
- case '3280000': $result = 'PowerShot A2300'; break;
459
- case '3330000': $result = 'PowerShot G15'; break;
460
- case '3340000': $result = 'PowerShot SX50 HS'; break;
461
- case '3350000': $result = 'PowerShot SX160 IS'; break;
462
- case '3360000': $result = 'PowerShot S110 (new)'; break;
463
- case '3370000': $result = 'PowerShot SX500 IS'; break;
464
- case '3380000': $result = 'PowerShot N'; break;
465
- case '3390000': $result = 'IXUS 245 HS / IXY 430F'; break;
466
- case '3400000': $result = 'PowerShot SX280 HS'; break;
467
- case '3410000': $result = 'PowerShot SX270 HS'; break;
468
- case '3420000': $result = 'PowerShot A3500 IS'; break;
469
- case '3430000': $result = 'PowerShot A2600'; break;
470
- case '3440000': $result = 'PowerShot SX275 HS'; break;
471
- case '3450000': $result = 'PowerShot A1400'; break;
472
- case '3460000': $result = 'PowerShot ELPH 130 IS / IXUS 140 / IXY 110F'; break;
473
- case '3470000': $result = 'PowerShot ELPH 115/120 IS / IXUS 132/135 / IXY 90F/100F'; break;
474
- case '3490000': $result = 'PowerShot ELPH 330 HS / IXUS 255 HS / IXY 610F'; break;
475
- case '3510000': $result = 'PowerShot A2500'; break;
476
- case '3540000': $result = 'PowerShot G16'; break;
477
- case '3550000': $result = 'PowerShot S120'; break;
478
- case '3560000': $result = 'PowerShot SX170 IS'; break;
479
- case '3580000': $result = 'PowerShot SX510 HS'; break;
480
- case '3590000': $result = 'PowerShot S200 (new)'; break;
481
- case '3600000': $result = 'IXY 620F'; break;
482
- case '3610000': $result = 'PowerShot N100'; break;
483
- case '3640000': $result = 'PowerShot G1 X Mark II'; break;
484
- case '3650000': $result = 'PowerShot D30'; break;
485
- case '3660000': $result = 'PowerShot SX700 HS'; break;
486
- case '3670000': $result = 'PowerShot SX600 HS'; break;
487
- case '3680000': $result = 'PowerShot ELPH 140 IS / IXUS 150 / IXY 130'; break;
488
- case '3690000': $result = 'PowerShot ELPH 135 / IXUS 145 / IXY 120'; break;
489
- case '3700000': $result = 'PowerShot ELPH 340 HS / IXUS 265 HS / IXY 630'; break;
490
- case '3710000': $result = 'PowerShot ELPH 150 IS / IXUS 155 / IXY 140'; break;
491
- case '3740000': $result = 'EOS M3'; break;
492
- case '3750000': $result = 'PowerShot SX60 HS'; break;
493
- case '3760000': $result = 'PowerShot SX520 HS'; break;
494
- case '3770000': $result = 'PowerShot SX400 IS'; break;
495
- case '3780000': $result = 'PowerShot G7 X'; break;
496
- case '3790000': $result = 'PowerShot N2'; break;
497
- case '3800000': $result = 'PowerShot SX530 HS'; break;
498
- case '3820000': $result = 'PowerShot SX710 HS'; break;
499
- case '3830000': $result = 'PowerShot SX610 HS'; break;
500
- case '3840000': $result = 'EOS M10'; break;
501
- case '3850000': $result = 'PowerShot G3 X'; break;
502
- case '3860000': $result = 'PowerShot ELPH 165 HS / IXUS 165 / IXY 160'; break;
503
- case '3870000': $result = 'PowerShot ELPH 160 / IXUS 160'; break;
504
- case '3880000': $result = 'PowerShot ELPH 350 HS / IXUS 275 HS / IXY 640'; break;
505
- case '3890000': $result = 'PowerShot ELPH 170 IS / IXUS 170'; break;
506
- case '3910000': $result = 'PowerShot SX410 IS'; break;
507
- case '3930000': $result = 'PowerShot G9 X'; break;
508
- case '3940000': $result = 'EOS M5'; break;
509
- case '3950000': $result = 'PowerShot G5 X'; break;
510
- case '3970000': $result = 'PowerShot G7 X Mark II'; break;
511
- case '3980000': $result = 'EOS M100'; break;
512
- case '3990000': $result = 'PowerShot ELPH 360 HS / IXUS 285 HS / IXY 650'; break;
513
- case '4010000': $result = 'PowerShot SX540 HS'; break;
514
- case '4020000': $result = 'PowerShot SX420 IS'; break;
515
- case '4030000': $result = 'PowerShot ELPH 190 IS / IXUS 180 / IXY 190'; break;
516
- case '4040000': $result = 'PowerShot G1'; break;
517
- case '4040001': $result = 'IXY 180'; break;
518
- case '4050000': $result = 'PowerShot SX720 HS'; break;
519
- case '4060000': $result = 'PowerShot SX620 HS'; break;
520
- case '4070000': $result = 'EOS M6'; break;
521
- case '4100000': $result = 'PowerShot G9 X Mark II'; break;
522
- case '4150000': $result = 'PowerShot ELPH 185 / IXUS 185 / IXY 200'; break;
523
- case '4160000': $result = 'PowerShot SX430 IS'; break;
524
- case '4170000': $result = 'PowerShot SX730 HS'; break;
525
- case '4180000': $result = 'PowerShot G1 X Mark III'; break;
526
- case '6040000': $result = 'PowerShot S100 / Digital IXUS / IXY Digital'; break;
527
- case '4007d673': $result = 'DC19/DC21/DC22'; break;
528
- case '4007d674': $result = 'XH A1'; break;
529
- case '4007d675': $result = 'HV10'; break;
530
- case '4007d676': $result = 'MD130/MD140/MD150/MD160/ZR850'; break;
531
- case '4007d777': $result = 'DC50'; break;
532
- case '4007d778': $result = 'HV20'; break;
533
- case '4007d779': $result = 'DC211'; break;
534
- case '4007d77a': $result = 'HG10'; break;
535
- case '4007d77b': $result = 'HR10'; break;
536
- case '4007d77d': $result = 'MD255/ZR950'; break;
537
- case '4007d81c': $result = 'HF11'; break;
538
- case '4007d878': $result = 'HV30'; break;
539
- case '4007d87c': $result = 'XH A1S'; break;
540
- case '4007d87e': $result = 'DC301/DC310/DC311/DC320/DC330'; break;
541
- case '4007d87f': $result = 'FS100'; break;
542
- case '4007d880': $result = 'HF10'; break;
543
- case '4007d882': $result = 'HG20/HG21'; break;
544
- case '4007d925': $result = 'HF21'; break;
545
- case '4007d926': $result = 'HF S11'; break;
546
- case '4007d978': $result = 'HV40'; break;
547
- case '4007d987': $result = 'DC410/DC411/DC420'; break;
548
- case '4007d988': $result = 'FS19/FS20/FS21/FS22/FS200'; break;
549
- case '4007d989': $result = 'HF20/HF200'; break;
550
- case '4007d98a': $result = 'HF S10/S100'; break;
551
- case '4007da8e': $result = 'HF R10/R16/R17/R18/R100/R106'; break;
552
- case '4007da8f': $result = 'HF M30/M31/M36/M300/M306'; break;
553
- case '4007da90': $result = 'HF S20/S21/S200'; break;
554
- case '4007da92': $result = 'FS31/FS36/FS37/FS300/FS305/FS306/FS307'; break;
555
- case '4007dca0': $result = 'EOS C300'; break;
556
- case '4007dda9': $result = 'HF G25'; break;
557
- case '4007dfb4': $result = 'XC10'; break;
558
- case '80000001': $result = 'EOS-1D'; break;
559
- case '80000167': $result = 'EOS-1DS'; break;
560
- case '80000168': $result = 'EOS 10D'; break;
561
- case '80000169': $result = 'EOS-1D Mark III'; break;
562
- case '80000170': $result = 'EOS Digital Rebel / 300D / Kiss Digital'; break;
563
- case '80000174': $result = 'EOS-1D Mark II'; break;
564
- case '80000175': $result = 'EOS 20D'; break;
565
- case '80000176': $result = 'EOS Digital Rebel XSi / 450D / Kiss X2'; break;
566
- case '80000188': $result = 'EOS-1Ds Mark II'; break;
567
- case '80000189': $result = 'EOS Digital Rebel XT / 350D / Kiss Digital N'; break;
568
- case '80000190': $result = 'EOS 40D'; break;
569
- case '80000213': $result = 'EOS 5D'; break;
570
- case '80000215': $result = 'EOS-1Ds Mark III'; break;
571
- case '80000218': $result = 'EOS 5D Mark II'; break;
572
- case '80000219': $result = 'WFT-E1'; break;
573
- case '80000232': $result = 'EOS-1D Mark II N'; break;
574
- case '80000234': $result = 'EOS 30D'; break;
575
- case '80000236': $result = 'EOS Digital Rebel XTi / 400D / Kiss Digital X'; break;
576
- case '80000241': $result = 'WFT-E2'; break;
577
- case '80000246': $result = 'WFT-E3'; break;
578
- case '80000250': $result = 'EOS 7D'; break;
579
- case '80000252': $result = 'EOS Rebel T1i / 500D / Kiss X3'; break;
580
- case '80000254': $result = 'EOS Rebel XS / 1000D / Kiss F'; break;
581
- case '80000261': $result = 'EOS 50D'; break;
582
- case '80000269': $result = 'EOS-1D X'; break;
583
- case '80000270': $result = 'EOS Rebel T2i / 550D / Kiss X4'; break;
584
- case '80000271': $result = 'WFT-E4'; break;
585
- case '80000273': $result = 'WFT-E5'; break;
586
- case '80000281': $result = 'EOS-1D Mark IV'; break;
587
- case '80000285': $result = 'EOS 5D Mark III'; break;
588
- case '80000286': $result = 'EOS Rebel T3i / 600D / Kiss X5'; break;
589
- case '80000287': $result = 'EOS 60D'; break;
590
- case '80000288': $result = 'EOS Rebel T3 / 1100D / Kiss X50'; break;
591
- case '80000289': $result = 'EOS 7D Mark II'; break;
592
- case '80000297': $result = 'WFT-E2 II'; break;
593
- case '80000298': $result = 'WFT-E4 II'; break;
594
- case '80000301': $result = 'EOS Rebel T4i / 650D / Kiss X6i'; break;
595
- case '80000302': $result = 'EOS 6D'; break;
596
- case '80000324': $result = 'EOS-1D C'; break;
597
- case '80000325': $result = 'EOS 70D'; break;
598
- case '80000326': $result = 'EOS Rebel T5i / 700D / Kiss X7i'; break;
599
- case '80000327': $result = 'EOS Rebel T5 / 1200D / Kiss X70'; break;
600
- case '80000328': $result = 'EOS-1D X MARK II'; break;
601
- case '80000331': $result = 'EOS M'; break;
602
- case '80000346': $result = 'EOS Rebel SL1 / 100D / Kiss X7'; break;
603
- case '80000347': $result = 'EOS Rebel T6s / 760D / 8000D'; break;
604
- case '80000349': $result = 'EOS 5D Mark IV'; break;
605
- case '80000350': $result = 'EOS 80D'; break;
606
- case '80000355': $result = 'EOS M2'; break;
607
- case '80000382': $result = 'EOS 5DS'; break;
608
- case '80000393': $result = 'EOS Rebel T6i / 750D / Kiss X8i'; break;
609
- case '80000401': $result = 'EOS 5DS R'; break;
610
- case '80000404': $result = 'EOS Rebel T6 / 1300D / Kiss X80'; break;
611
- case '80000405': $result = 'EOS Rebel T7i / 800D / Kiss X9i'; break;
612
- case '80000406': $result = 'EOS 6D Mark II'; break;
613
- case '80000408': $result = 'EOS 77D / 9000D'; break;
614
- case '80000417': $result = 'EOS Rebel SL2 / 200D / Kiss X9'; break;
615
-
616
- default:
617
- $result = $data;
618
- }
619
- return $result;
620
- break;
621
- case 'NIKON':
622
- $result = $data;
623
- return $result;
624
- break;
625
- default:
626
- $result = $data;
627
- return $result;
628
  }
629
- break;
630
 
631
- case 'E#0011': // MovieInfo / OrientationInfo
632
- switch( $brand ) {
633
- case 'SAMSUNG': // OrientationInfo
634
 
635
- if ( ! wppa_is_valid_rational( $data ) ) {
636
- return $wppa_exif_error_output;
637
- }
638
 
639
- $temp = explode( '/', $data );
640
- $x = $temp[0];
641
- $y = $temp[1];
642
 
643
- $result = ( $x / $y ) . ' ' . __( 'degrees', 'wp-photo-album-plus' );
 
 
644
 
645
- return $result;
646
- break;
647
- default:
648
- $result = $data;
649
- return $result;
650
  }
651
- break;
652
 
653
  case 'E#0012': // CanonAFInfo
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
654
  case 'E#0013': // ThumbnailImageValidArea
655
- $result = $data;
656
  return $result;
657
 
658
  case 'E#0015': // SerialNumberFormat
@@ -675,8 +719,26 @@ global $wppa_exif_error_output;
675
 
676
  case 'E#001A': // SuperMacro
677
  case 'E#001C': // DateStampMode
 
 
678
  case 'E#001D': // MyColors
679
- $result = $data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680
  return $result;
681
 
682
  case 'E#001E': // FirmwareRevision (Canon) / ColorSpace (Nikon)
@@ -727,16 +789,138 @@ global $wppa_exif_error_output;
727
  $result = $data;
728
  return $result;
729
  }
 
730
 
731
  case 'E#0023': // Categories
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  case 'E#0024': // FaceDetect1
733
  case 'E#0025': // FaceDetect2
 
 
734
  case 'E#0026': // CanonAFInfo2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
  case 'E#0027': // ContrastInfo
 
 
 
 
 
 
736
  case 'E#0028': // ImageUniqueID
737
  case 'E#002F': // FaceDetect3
 
 
738
  case 'E#0035': // TimeInfo
739
- case 'E#003C': // AFInfo3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
740
  case 'E#0081': // RawDataOffset
741
  case 'E#0083': // OriginalDecisionDataOffset
742
  case 'E#0090': // CustomFunctions1D
@@ -749,7 +933,47 @@ global $wppa_exif_error_output;
749
  case 'E#0097': // DustRemovalData
750
  case 'E#0098': // CropInfo
751
  case 'E#0099': // CustomFunctions2
 
 
 
752
  case 'E#009A': // AspectInfo
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
753
  case 'E#00A0': // ProcessingInfo
754
  case 'E#00A1': // ToneCurveTable
755
  case 'E#00A2': // SharpnessTable
@@ -1491,15 +1715,19 @@ global $wppa_exif_error_output;
1491
 
1492
  if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
1493
 
1494
- $result = wppa_simplify_ratio( $data );
 
 
 
 
 
 
1495
  return $result;
1496
  break;
1497
 
1498
  case 'E#9201': // Shutter speed value
1499
 
1500
- if ( ! wppa_is_valid_rational( $data, true ) ) {
1501
- return $wppa_exif_error_output;
1502
- }
1503
 
1504
  // Format is valid
1505
  $temp = explode( '/', $data );
@@ -1530,7 +1758,7 @@ global $wppa_exif_error_output;
1530
  case 'E#9204': // ExposureBiasValue
1531
 
1532
  // Invalid format?
1533
- if ( ! wppa_is_valid_rational( $data, true ) ) {
1534
  return $wppa_exif_error_output;
1535
  }
1536
 
@@ -1562,7 +1790,7 @@ global $wppa_exif_error_output;
1562
  case 'E#9206': // Subject distance
1563
 
1564
  // Invalid format?
1565
- if ( ! wppa_is_valid_rational( $data, true ) ) {
1566
  return $wppa_exif_error_output;
1567
  }
1568
 
@@ -1983,7 +2211,7 @@ global $wppa_exif_error_output;
1983
  return $result;
1984
  }
1985
 
1986
- $result = wppa_simplify_ratio( $data );
1987
  return $result;
1988
  break;
1989
 
@@ -2373,6 +2601,243 @@ global $wppa_exif_error_output;
2373
  }
2374
  return $result;
2375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2376
  // Unformatted
2377
  default:
2378
  $result = $data;
@@ -2388,27 +2853,27 @@ global $wppa_exif_error_output;
2388
  return $result;
2389
  }
2390
 
2391
- function wppa_is_valid_rational( $data, $signed = false ) {
2392
  global $wppa_exif_error_output;
2393
 
2394
  // Must contain a '/'
2395
  if ( strpos( $data, '/' ) == false ) {
2396
- $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Missing /', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2397
  return false;
2398
  }
2399
 
2400
  // make array
2401
  $t = explode( '/', $data );
2402
 
2403
- // Divide by zero?
2404
- if ( $t[1] == 0 ) {
2405
- $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Divide by zero', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2406
  return false;
2407
  }
2408
 
2409
- // Signed while not permitted?
2410
- if ( ! $signed && ( $t[0] < 0 || $t[1] < 0 ) ) {
2411
- $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Must be positive', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2412
  return false;
2413
  }
2414
 
@@ -2419,7 +2884,7 @@ global $wppa_exif_error_output;
2419
 
2420
  // Unlikely value?
2421
  if ( $t[0] / $t[1] > 100000 || abs( $t[0] / $t[1] ) < 0.00001 ) {
2422
- $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Unlikely value', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2423
  return false;
2424
  }
2425
 
@@ -2427,13 +2892,22 @@ global $wppa_exif_error_output;
2427
  return true;
2428
  }
2429
 
2430
- function wppa_simplify_ratio( $data ) {
2431
 
2432
  // make array
2433
  $t = explode( '/', $data );
2434
  $x = $t[0];
2435
  $y = $t[1];
2436
 
 
 
 
 
 
 
 
 
 
2437
  // Is already simplified to the max?
2438
  if ( $x == 1 ) {
2439
  $result = $data;
@@ -2442,7 +2916,7 @@ function wppa_simplify_ratio( $data ) {
2442
 
2443
  // Result is zero?
2444
  if ( $x == 0 ) {
2445
- $result = '0';
2446
  return $result;
2447
  }
2448
 
@@ -2452,8 +2926,8 @@ function wppa_simplify_ratio( $data ) {
2452
  return $result;
2453
  }
2454
 
2455
- /* to be continued */
2456
- $prime = array(2,3,5,7,11,13,17);
2457
  foreach( $prime as $p ) {
2458
  while ( wppa_is_divisible( $x, $p ) && wppa_is_divisible( $y, $p ) ) {
2459
  $x = $x / $p;
@@ -2462,7 +2936,6 @@ function wppa_simplify_ratio( $data ) {
2462
  }
2463
  $result = $x . '/' . $y;
2464
 
2465
- $result = $data;
2466
  return $result;
2467
  }
2468
 
@@ -2539,7 +3012,7 @@ global $wpdb;
2539
  foreach( $exifs as $exif ) {
2540
 
2541
  $f_description = strip_tags( wppa_format_exif( $exif['tag'], $exif['description'], $brand ) );
2542
- $tagbrand = ( trim( wppa_exif_tagname( hexdec( substr( $exif['tag'], 2, 4 ) ), $brand, 'brandonly' ), ': ' ) ? $brand : '' );
2543
 
2544
  // If f_description or thabrand changed: update
2545
  if ( $f_description != $exif['f_description'] || $tagbrand != $exif['brand'] ) {
@@ -2729,7 +3202,7 @@ global $wppa;
2729
 
2730
  // Get exif data
2731
  if ( ! function_exists( 'exif_read_data' ) ) return false; // Not supported by the server
2732
- $exif = @ exif_read_data( $file, 'EXIF' );
2733
  if ( ! is_array( $exif ) ) return false; // No data present
2734
 
2735
  // There is exif data for this image.
@@ -2782,7 +3255,7 @@ global $wppa;
2782
  $status = 'display';
2783
  if ( substr( $s, 0, 12 ) == 'UndefinedTag' ) {
2784
  $status = 'option';
2785
- $desc = wppa_exif_tagname( hexdec( substr( $tag, 2, 4 ) ) );
2786
  if ( substr( $desc, 0, 12 ) != 'UndefinedTag' ) {
2787
  $status = 'display';
2788
  }
@@ -2793,7 +3266,10 @@ global $wppa;
2793
 
2794
  // Now add poto specific data item
2795
  // If its an array...
2796
- if ( is_array( $exif[$s] ) ) { // continue;
 
 
 
2797
 
2798
  $c = count ( $exif[$s] );
2799
  $max = wppa_opt( 'exif_max_array_size' );
@@ -2809,16 +3285,32 @@ global $wppa;
2809
  if ( ! $bret ) wppa_log( 'War', 'Could not add EXIF tag '.$tag.' for photo '.$photo );
2810
 
2811
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
2812
  }
2813
  // Its not an array
2814
  else {
2815
 
2816
- $photo = $id;
2817
  $desc = $exif[$s];
2818
- $status = 'default';
2819
- $bret = wppa_create_exif_entry( array( 'photo' => $photo, 'tag' => $tag, 'description' => $desc, 'status' => $status ) );
2820
- if ( ! $bret ) {} /* wppa_log( 'Warning 3', 'Could not add EXIF tag '.$tag.' for photo '.$photo.', desc = '.$desc ); */ // Is junk, dont care
2821
  }
 
 
 
 
 
 
2822
  }
2823
 
2824
  wppa_fix_exif_format( $id );
@@ -2827,8 +3319,10 @@ global $wppa;
2827
  // Convert exif tagname as found by exif_read_data() to E#XXXX, Inverse of exif_tagname();
2828
  function wppa_exif_tag( $tagname ) {
2829
  static $wppa_inv_exiftags;
 
 
2830
 
2831
- // Setup inverted matrix
2832
  if ( ! is_array( $wppa_inv_exiftags ) ) {
2833
  $key = 0;
2834
  while ( $key < 65536 ) {
@@ -2841,15 +3335,73 @@ static $wppa_inv_exiftags;
2841
  }
2842
  }
2843
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2844
  // Search
2845
- if ( isset( $wppa_inv_exiftags[$tagname] ) ) return sprintf( 'E#%04X',$wppa_inv_exiftags[$tagname] );
 
 
 
 
 
 
 
 
2846
  elseif ( strlen( $tagname ) == 19 ) {
2847
  if ( substr( $tagname, 0, 12 ) == 'UndefinedTag' ) return 'E#'.substr( $tagname, -4 );
2848
  }
2849
  else return '';
2850
  }
2851
 
2852
- // Wrapper around exif_tagname(), convert 0xXXXX to TagName
2853
  function wppa_exif_tagname( $tag, $brand = '', $brandonly = false ) {
2854
  global $wpdb;
2855
  static $canontags;
@@ -2857,193 +3409,198 @@ static $nikontags;
2857
  static $samsungtags;
2858
  static $editabletags;
2859
  static $commontags;
 
 
2860
 
 
 
 
2861
  // Fill $canontags if not done yet
2862
  if ( empty( $canontags ) ) {
2863
  $canontags = array(
2864
- 0x0001 => 'CanonCameraSettings',
2865
- 0x0002 => 'CanonFocalLength',
2866
- 0x0003 => 'CanonFlashInfo?',
2867
- 0x0004 => 'CanonShotInfo',
2868
- 0x0005 => 'CanonPanorama',
2869
- 0x0006 => 'CanonImageType',
2870
- 0x0007 => 'CanonFirmwareVersion',
2871
- 0x0008 => 'FileNumber',
2872
- 0x0009 => 'OwnerName',
2873
- 0x000a => 'UnknownD30',
2874
- 0x000c => 'SerialNumber',
2875
- 0x000d => 'CanonCameraInfo',
2876
- 0x000e => 'CanonFileLength',
2877
- 0x000f => 'CustomFunctions',
2878
- 0x0010 => 'CanonModelID',
2879
- 0x0011 => 'MovieInfo',
2880
- 0x0012 => 'CanonAFInfo',
2881
- 0x0013 => 'ThumbnailImageValidArea',
2882
- 0x0015 => 'SerialNumberFormat',
2883
- 0x001a => 'SuperMacro',
2884
- 0x001c => 'DateStampMode',
2885
- 0x001d => 'MyColors',
2886
- 0x001e => 'FirmwareRevision',
2887
- 0x0023 => 'Categories',
2888
- 0x0024 => 'FaceDetect1',
2889
- 0x0025 => 'FaceDetect2',
2890
- 0x0026 => 'CanonAFInfo2',
2891
- 0x0027 => 'ContrastInfo',
2892
- 0x0028 => 'ImageUniqueID',
2893
- 0x002f => 'FaceDetect3',
2894
- 0x0035 => 'TimeInfo',
2895
- 0x003c => 'AFInfo3',
2896
- 0x0081 => 'RawDataOffset',
2897
- 0x0083 => 'OriginalDecisionDataOffset',
2898
- 0x0090 => 'CustomFunctions1D',
2899
- 0x0091 => 'PersonalFunctions',
2900
- 0x0092 => 'PersonalFunctionValues',
2901
- 0x0093 => 'CanonFileInfo',
2902
- 0x0094 => 'AFPointsInFocus1D',
2903
- 0x0095 => 'LensModel',
2904
- 0x0096 => 'SerialInfo',
2905
- 0x0097 => 'DustRemovalData',
2906
- 0x0098 => 'CropInfo',
2907
- 0x0099 => 'CustomFunctions2',
2908
- 0x009a => 'AspectInfo',
2909
- 0x00a0 => 'ProcessingInfo',
2910
- 0x00a1 => 'ToneCurveTable',
2911
- 0x00a2 => 'SharpnessTable',
2912
- 0x00a3 => 'SharpnessFreqTable',
2913
- 0x00a4 => 'WhiteBalanceTable',
2914
- 0x00a9 => 'ColorBalance',
2915
- 0x00aa => 'MeasuredColor',
2916
- 0x00ae => 'ColorTemperature',
2917
- 0x00b0 => 'CanonFlags',
2918
- 0x00b1 => 'ModifiedInfo',
2919
- 0x00b2 => 'ToneCurveMatching',
2920
- 0x00b3 => 'WhiteBalanceMatching',
2921
- 0x00b4 => 'ColorSpace',
2922
- 0x00b6 => 'PreviewImageInfo',
2923
- 0x00d0 => 'VRDOffset',
2924
- 0x00e0 => 'SensorInfo',
2925
- 0x4001 => 'ColorData',
2926
- 0x4002 => 'CRWParam?',
2927
- 0x4003 => 'ColorInfo',
2928
- 0x4005 => 'Flavor?',
2929
- 0x4008 => 'PictureStyleUserDef',
2930
- 0x4009 => 'PictureStylePC',
2931
- 0x4010 => 'CustomPictureStyleFileName',
2932
- 0x4013 => 'AFMicroAdj',
2933
- 0x4015 => 'VignettingCorr',
2934
- 0x4016 => 'VignettingCorr2',
2935
- 0x4018 => 'LightingOpt',
2936
- 0x4019 => 'LensInfo',
2937
- 0x4020 => 'AmbienceInfo',
2938
- 0x4021 => 'MultiExp',
2939
- 0x4024 => 'FilterInfo',
2940
- 0x4025 => 'HDRInfo',
2941
- 0x4028 => 'AFConfig',
2942
  );
2943
  }
2944
 
2945
  // Fill $nikontags if not done yet
2946
  if ( empty( $nikontags ) ) {
2947
  $nikontags = array(
2948
- 0x0001 => 'MakerNoteVersion',
2949
- 0x0002 => 'ISO',
2950
- 0x0003 => 'ColorMode',
2951
- 0x0004 => 'Quality',
2952
- 0x0005 => 'WhiteBalance',
2953
- 0x0006 => 'Sharpness',
2954
- 0x0007 => 'FocusMode',
2955
- 0x0008 => 'FlashSetting',
2956
- 0x0009 => 'FlashType',
2957
- 0x000b => 'WhiteBalanceFineTune',
2958
- 0x000c => 'WB_RBLevels',
2959
- 0x000d => 'ProgramShift',
2960
- 0x000e => 'ExposureDifference',
2961
- 0x000f => 'ISOSelection',
2962
- 0x0010 => 'DataDump',
2963
- 0x0011 => 'PreviewIFD',
2964
- 0x0012 => 'FlashExposureComp',
2965
- 0x0013 => 'ISOSetting',
2966
- 0x0014 => 'ColorBalanceA',
2967
- 0x0016 => 'ImageBoundary',
2968
- 0x0017 => 'ExternalFlashExposureComp',
2969
- 0x0018 => 'FlashExposureBracketValue',
2970
- 0x0019 => 'ExposureBracketValue',
2971
- 0x001a => 'ImageProcessing',
2972
- 0x001b => 'CropHiSpeed',
2973
- 0x001c => 'ExposureTuning',
2974
- 0x001d => 'SerialNumber',
2975
- 0x001e => 'ColorSpace',
2976
- 0x001f => 'VRInfo',
2977
- 0x0020 => 'ImageAuthentication',
2978
- 0x0021 => 'FaceDetect',
2979
- 0x0022 => 'ActiveD-Lighting',
2980
- 0x0023 => 'PictureControlData',
2981
- 0x0024 => 'WorldTime',
2982
- 0x0025 => 'ISOInfo',
2983
- 0x002a => 'VignetteControl',
2984
- 0x002b => 'DistortInfo',
2985
- 0x002c => 'UnknownInfo',
2986
- 0x0032 => 'UnknownInfo2',
2987
- 0x0035 => 'HDRInfo',
2988
- 0x0039 => 'LocationInfo',
2989
- 0x003d => 'BlackLevel',
2990
- 0x004f => 'ColorTemperatureAuto',
2991
- 0x0080 => 'ImageAdjustment',
2992
- 0x0081 => 'ToneComp',
2993
- 0x0082 => 'AuxiliaryLens',
2994
- 0x0083 => 'LensType',
2995
- 0x0084 => 'Lens',
2996
- 0x0085 => 'ManualFocusDistance',
2997
- 0x0086 => 'DigitalZoom',
2998
- 0x0087 => 'FlashMode',
2999
- 0x0088 => 'AFInfo',
3000
- 0x0089 => 'ShootingMode',
3001
- 0x008b => 'LensFStops',
3002
- 0x008c => 'ContrastCurve',
3003
- 0x008d => 'ColorHue',
3004
- 0x008f => 'SceneMode',
3005
- 0x0090 => 'LightSource',
3006
- 0x0091 => 'ShotInfo',
3007
- 0x0092 => 'HueAdjustment',
3008
- 0x0093 => 'NEFCompression',
3009
- 0x0094 => 'Saturation',
3010
- 0x0095 => 'NoiseReduction',
3011
- 0x0096 => 'NEFLinearizationTable',
3012
- 0x0097 => 'ColorBalance',
3013
- 0x0099 => 'RawImageCenter',
3014
- 0x009a => 'SensorPixelSize',
3015
- 0x009c => 'SceneAssist',
3016
- 0x009e => 'RetouchHistory',
3017
- 0x00a0 => 'SerialNumber',
3018
- 0x00a2 => 'ImageDataSize',
3019
- 0x00a5 => 'ImageCount',
3020
- 0x00a6 => 'DeletedImageCount',
3021
- 0x00a7 => 'ShutterCount',
3022
- 0x00a8 => 'FlashInfo',
3023
- 0x00a9 => 'ImageOptimization',
3024
- 0x00aa => 'Saturation',
3025
- 0x00ab => 'VariProgram',
3026
- 0x00ac => 'ImageStabilization',
3027
- 0x00ad => 'AFResponse',
3028
- 0x00b0 => 'MultiExposure',
3029
- 0x00b1 => 'HighISONoiseReduction',
3030
- 0x00b3 => 'ToningEffect',
3031
- 0x00b6 => 'PowerUpTime',
3032
- 0x00b7 => 'AFInfo2',
3033
- 0x00b8 => 'FileInfo',
3034
- 0x00b9 => 'AFTune',
3035
- 0x00bb => 'RetouchInfo',
3036
- 0x00bd => 'PictureControlData',
3037
- 0x00c3 => 'BarometerInfo',
3038
- 0x0e00 => 'PrintIM',
3039
- 0x0e01 => 'NikonCaptureData',
3040
- 0x0e09 => 'NikonCaptureVersion',
3041
- 0x0e0e => 'NikonCaptureOffsets',
3042
- 0x0e10 => 'NikonScanIFD',
3043
- 0x0e13 => 'NikonCaptureEditVersions',
3044
- 0x0e1d => 'NikonICCProfile',
3045
- 0x0e1e => 'NikonCaptureOutput',
3046
- 0x0e22 => 'NEFBitDepth',
3047
 
3048
  );
3049
  }
@@ -3051,58 +3608,58 @@ static $commontags;
3051
  // Fill $samsungtags
3052
  if ( empty( $samsungtags ) ) {
3053
  $samsungtags = array(
3054
- 0x0001 => 'MakerNoteVersion',
3055
- 0x0002 => 'DeviceType',
3056
- 0x0003 => 'SamsungModelID',
3057
- 0x0011 => 'OrientationInfo',
3058
- 0x0020 => 'SmartAlbumColor',
3059
- 0x0021 => 'PictureWizard',
3060
- 0x0030 => 'LocalLocationName',
3061
- 0x0031 => 'LocationName',
3062
- 0x0035 => 'PreviewIFD',
3063
- 0x0040 => 'RawDataByteOrder',
3064
- 0x0041 => 'WhiteBalanceSetup',
3065
- 0x0043 => 'CameraTemperature',
3066
- 0x0050 => 'RawDataCFAPattern',
3067
- 0x0100 => 'FaceDetect',
3068
- 0x0120 => 'FaceRecognition',
3069
- 0x0123 => 'FaceName',
3070
- 0xa001 => 'FirmwareName',
3071
- 0xa003 => 'LensType',
3072
- 0xa004 => 'LensFirmware',
3073
- 0xa005 => 'InternalLensSerialNumber',
3074
- 0xa010 => 'SensorAreas',
3075
- 0xa011 => 'ColorSpace',
3076
- 0xa012 => 'SmartRange',
3077
- 0xa013 => 'ExposureCompensation',
3078
- 0xa014 => 'ISO',
3079
- 0xa018 => 'ExposureTime',
3080
- 0xa019 => 'FNumber',
3081
- 0xa01a => 'FocalLengthIn35mmFormat',
3082
- 0xa020 => 'EncryptionKey',
3083
- 0xa021 => 'WB_RGGBLevelsUncorrected',
3084
- 0xa022 => 'WB_RGGBLevelsAuto',
3085
- 0xa023 => 'WB_RGGBLevelsIlluminator1',
3086
- 0xa024 => 'WB_RGGBLevelsIlluminator2',
3087
- 0xa025 => 'HighlightLinearityLimit',
3088
- 0xa028 => 'WB_RGGBLevelsBlack',
3089
- 0xa030 => 'ColorMatrix',
3090
- 0xa031 => 'ColorMatrixSRGB',
3091
- 0xa032 => 'ColorMatrixAdobeRGB',
3092
- 0xa033 => 'CbCrMatrixDefault',
3093
- 0xa034 => 'CbCrMatrix',
3094
- 0xa035 => 'CbCrGainDefault',
3095
- 0xa036 => 'CbCrGain',
3096
- 0xa040 => 'ToneCurveSRGBDefault',
3097
- 0xa041 => 'ToneCurveAdobeRGBDefault',
3098
- 0xa042 => 'ToneCurveSRGB',
3099
- 0xa043 => 'ToneCurveAdobeRGB',
3100
- 0xa048 => 'RawData?',
3101
- 0xa050 => 'Distortion?',
3102
- 0xa051 => 'ChromaticAberration?',
3103
- 0xa052 => 'Vignetting?',
3104
- 0xa053 => 'VignettingCorrection?',
3105
- 0xa054 => 'VignettingSetting?',
3106
 
3107
  );
3108
  }
@@ -3118,471 +3675,518 @@ static $commontags;
3118
 
3119
  if ( empty( $commontags ) ) {
3120
  $commontags = array(
3121
- 0x0001 => 'InteropIndex',
3122
- 0x0002 => 'InteropVersion',
3123
- 0x000b => 'ProcessingSoftware',
3124
- 0x00fe => 'SubfileType',
3125
- 0x00ff => 'OldSubfileType',
3126
- 0x0100 => 'ImageWidth',
3127
- 0x0101 => 'ImageHeight',
3128
- 0x0102 => 'BitsPerSample',
3129
- 0x0103 => 'Compression',
3130
- 0x0106 => 'PhotometricInterpretation',
3131
- 0x0107 => 'Thresholding',
3132
- 0x0108 => 'CellWidth',
3133
- 0x0109 => 'CellLength',
3134
- 0x010a => 'FillOrder',
3135
- 0x010d => 'DocumentName',
3136
- 0x010e => 'ImageDescription',
3137
- 0x010f => 'Make',
3138
- 0x0110 => 'Model',
3139
- 0x0111 => 'StripOffsets',
3140
- 0x0112 => 'Orientation',
3141
- 0x0115 => 'SamplesPerPixel',
3142
- 0x0116 => 'RowsPerStrip',
3143
- 0x0117 => 'StripByteCounts',
3144
- 0x0118 => 'MinSampleValue',
3145
- 0x0119 => 'MaxSampleValue',
3146
- 0x011a => 'XResolution',
3147
- 0x011b => 'YResolution',
3148
- 0x011c => 'PlanarConfiguration',
3149
- 0x011d => 'PageName',
3150
- 0x011e => 'XPosition',
3151
- 0x011f => 'YPosition',
3152
- 0x0120 => 'FreeOffsets',
3153
- 0x0121 => 'FreeByteCounts',
3154
- 0x0122 => 'GrayResponseUnit',
3155
- 0x0123 => 'GrayResponseCurve',
3156
- 0x0124 => 'T4Options',
3157
- 0x0125 => 'T6Options',
3158
- 0x0128 => 'ResolutionUnit',
3159
- 0x0129 => 'PageNumber',
3160
- 0x012c => 'ColorResponseUnit',
3161
- 0x012d => 'TransferFunction',
3162
- 0x0131 => 'Software',
3163
- 0x0132 => 'ModifyDate',
3164
- 0x013b => 'Artist',
3165
- 0x013c => 'HostComputer',
3166
- 0x013d => 'Predictor',
3167
- 0x013e => 'WhitePoint',
3168
- 0x013f => 'PrimaryChromaticities',
3169
- 0x0140 => 'ColorMap',
3170
- 0x0141 => 'HalftoneHints',
3171
- 0x0142 => 'TileWidth',
3172
- 0x0143 => 'TileLength',
3173
- 0x0144 => 'TileOffsets',
3174
- 0x0145 => 'TileByteCounts',
3175
- 0x0146 => 'BadFaxLines',
3176
- 0x0147 => 'CleanFaxData',
3177
- 0x0148 => 'ConsecutiveBadFaxLines',
3178
- 0x014a => 'SubIFD',
3179
- 0x014c => 'InkSet',
3180
- 0x014d => 'InkNames',
3181
- 0x014e => 'NumberofInks',
3182
- 0x0150 => 'DotRange',
3183
- 0x0151 => 'TargetPrinter',
3184
- 0x0152 => 'ExtraSamples',
3185
- 0x0153 => 'SampleFormat',
3186
- 0x0154 => 'SMinSampleValue',
3187
- 0x0155 => 'SMaxSampleValue',
3188
- 0x0156 => 'TransferRange',
3189
- 0x0157 => 'ClipPath',
3190
- 0x0158 => 'XClipPathUnits',
3191
- 0x0159 => 'YClipPathUnits',
3192
- 0x015a => 'Indexed',
3193
- 0x015b => 'JPEGTables',
3194
- 0x015f => 'OPIProxy',
3195
- 0x0190 => 'GlobalParametersIFD',
3196
- 0x0191 => 'ProfileType',
3197
- 0x0192 => 'FaxProfile',
3198
- 0x0193 => 'CodingMethods',
3199
- 0x0194 => 'VersionYear',
3200
- 0x0195 => 'ModeNumber',
3201
- 0x01b1 => 'Decode',
3202
- 0x01b2 => 'DefaultImageColor',
3203
- 0x01b3 => 'T82Options',
3204
- 0x01b5 => 'JPEGTables',
3205
- 0x0200 => 'JPEGProc',
3206
- 0x0201 => 'ThumbnailOffset',
3207
- 0x0202 => 'ThumbnailLength',
3208
- 0x0203 => 'JPEGRestartInterval',
3209
- 0x0205 => 'JPEGLosslessPredictors',
3210
- 0x0206 => 'JPEGPointTransforms',
3211
- 0x0207 => 'JPEGQTables',
3212
- 0x0208 => 'JPEGDCTables',
3213
- 0x0209 => 'JPEGACTables',
3214
- 0x0211 => 'YCbCrCoefficients',
3215
- 0x0212 => 'YCbCrSubSampling',
3216
- 0x0213 => 'YCbCrPositioning',
3217
- 0x0214 => 'ReferenceBlackWhite',
3218
- 0x022f => 'StripRowCounts',
3219
- 0x02bc => 'ApplicationNotes',
3220
- 0x03e7 => 'USPTOMiscellaneous',
3221
- 0x1000 => 'RelatedImageFileFormat',
3222
- 0x1001 => 'RelatedImageWidth',
3223
- 0x1002 => 'RelatedImageHeight',
3224
- 0x4746 => 'Rating',
3225
- 0x4747 => 'XP_DIP_XML',
3226
- 0x4748 => 'StitchInfo',
3227
- 0x4749 => 'RatingPercent',
3228
- 0x7000 => 'SonyRawFileType',
3229
- 0x7032 => 'VignettingCorrParams',
3230
- 0x7035 => 'ChromaticAberrationCorrParams',
3231
- 0x7037 => 'DistortionCorrParams',
3232
- 0x800d => 'ImageID',
3233
- 0x80a3 => 'WangTag1',
3234
- 0x80a4 => 'WangAnnotation',
3235
- 0x80a5 => 'WangTag3',
3236
- 0x80a6 => 'WangTag4',
3237
- 0x80b9 => 'ImageReferencePoints',
3238
- 0x80ba => 'RegionXformTackPoint',
3239
- 0x80bb => 'WarpQuadrilateral',
3240
- 0x80bc => 'AffineTransformMat',
3241
- 0x80e3 => 'Matteing',
3242
- 0x80e4 => 'DataType',
3243
- 0x80e5 => 'ImageDepth',
3244
- 0x80e6 => 'TileDepth',
3245
- 0x8214 => 'ImageFullWidth',
3246
- 0x8215 => 'ImageFullHeight',
3247
- 0x8216 => 'TextureFormat',
3248
- 0x8217 => 'WrapModes',
3249
- 0x8218 => 'FovCot',
3250
- 0x8219 => 'MatrixWorldToScreen',
3251
- 0x821a => 'MatrixWorldToCamera',
3252
- 0x827d => 'Model2',
3253
- 0x828d => 'CFARepeatPatternDim',
3254
- 0x828e => 'CFAPattern2',
3255
- 0x828f => 'BatteryLevel',
3256
- 0x8290 => 'KodakIFD',
3257
- 0x8298 => 'Copyright',
3258
- 0x829a => 'ExposureTime',
3259
- 0x829d => 'FNumber',
3260
- 0x82a5 => 'MDFileTag',
3261
- 0x82a6 => 'MDScalePixel',
3262
- 0x82a7 => 'MDColorTable',
3263
- 0x82a8 => 'MDLabName',
3264
- 0x82a9 => 'MDSampleInfo',
3265
- 0x82aa => 'MDPrepDate',
3266
- 0x82ab => 'MDPrepTime',
3267
- 0x82ac => 'MDFileUnits',
3268
- 0x830e => 'PixelScale',
3269
- 0x8335 => 'AdventScale',
3270
- 0x8336 => 'AdventRevision',
3271
- 0x835c => 'UIC1Tag',
3272
- 0x835d => 'UIC2Tag',
3273
- 0x835e => 'UIC3Tag',
3274
- 0x835f => 'UIC4Tag',
3275
- 0x83bb => 'IPTC-NAA',
3276
- 0x847e => 'IntergraphPacketData',
3277
- 0x847f => 'IntergraphFlagRegisters',
3278
- 0x8480 => 'IntergraphMatrix',
3279
- 0x8481 => 'INGRReserved',
3280
- 0x8482 => 'ModelTiePoint',
3281
- 0x84e0 => 'Site',
3282
- 0x84e1 => 'ColorSequence',
3283
- 0x84e2 => 'IT8Header',
3284
- 0x84e3 => 'RasterPadding',
3285
- 0x84e4 => 'BitsPerRunLength',
3286
- 0x84e5 => 'BitsPerExtendedRunLength',
3287
- 0x84e6 => 'ColorTable',
3288
- 0x84e7 => 'ImageColorIndicator',
3289
- 0x84e8 => 'BackgroundColorIndicator',
3290
- 0x84e9 => 'ImageColorValue',
3291
- 0x84ea => 'BackgroundColorValue',
3292
- 0x84eb => 'PixelIntensityRange',
3293
- 0x84ec => 'TransparencyIndicator',
3294
- 0x84ed => 'ColorCharacterization',
3295
- 0x84ee => 'HCUsage',
3296
- 0x84ef => 'TrapIndicator',
3297
- 0x84f0 => 'CMYKEquivalent',
3298
- 0x8546 => 'SEMInfo',
3299
- 0x8568 => 'AFCP_IPTC',
3300
- 0x85b8 => 'PixelMagicJBIGOptions',
3301
- 0x85d7 => 'JPLCartoIFD',
3302
- 0x85d8 => 'ModelTransform',
3303
- 0x8602 => 'WB_GRGBLevels',
3304
- 0x8606 => 'LeafData',
3305
- 0x8649 => 'PhotoshopSettings',
3306
- 0x8769 => 'ExifOffset',
3307
- 0x8773 => 'ICC_Profile',
3308
- 0x877f => 'TIFF_FXExtensions',
3309
- 0x8780 => 'MultiProfiles',
3310
- 0x8781 => 'SharedData',
3311
- 0x8782 => 'T88Options',
3312
- 0x87ac => 'ImageLayer',
3313
- 0x87af => 'GeoTiffDirectory',
3314
- 0x87b0 => 'GeoTiffDoubleParams',
3315
- 0x87b1 => 'GeoTiffAsciiParams',
3316
- 0x87be => 'JBIGOptions',
3317
- 0x8822 => 'ExposureProgram',
3318
- 0x8824 => 'SpectralSensitivity',
3319
- 0x8825 => 'GPSInfo',
3320
- 0x8827 => 'ISO',
3321
- 0x8828 => 'Opto-ElectricConvFactor',
3322
- 0x8829 => 'Interlace',
3323
- 0x882a => 'TimeZoneOffset',
3324
- 0x882b => 'SelfTimerMode',
3325
- 0x8830 => 'SensitivityType',
3326
- 0x8831 => 'StandardOutputSensitivity',
3327
- 0x8832 => 'RecommendedExposureIndex',
3328
- 0x8833 => 'ISOSpeed',
3329
- 0x8834 => 'ISOSpeedLatitudeyyy',
3330
- 0x8835 => 'ISOSpeedLatitudezzz',
3331
- 0x885c => 'FaxRecvParams',
3332
- 0x885d => 'FaxSubAddress',
3333
- 0x885e => 'FaxRecvTime',
3334
- 0x8871 => 'FedexEDR',
3335
- 0x888a => 'LeafSubIFD',
3336
- 0x9000 => 'ExifVersion',
3337
- 0x9003 => 'DateTimeOriginal',
3338
- 0x9004 => 'CreateDate',
3339
- 0x9009 => 'GooglePlusUploadCode',
3340
- 0x9010 => 'OffsetTime',
3341
- 0x9011 => 'OffsetTimeOriginal',
3342
- 0x9012 => 'OffsetTimeDigitized',
3343
- 0x9101 => 'ComponentsConfiguration',
3344
- 0x9102 => 'CompressedBitsPerPixel',
3345
- 0x9201 => 'ShutterSpeedValue',
3346
- 0x9202 => 'ApertureValue',
3347
- 0x9203 => 'BrightnessValue',
3348
- 0x9204 => 'ExposureCompensation',
3349
- 0x9205 => 'MaxApertureValue',
3350
- 0x9206 => 'SubjectDistance',
3351
- 0x9207 => 'MeteringMode',
3352
- 0x9208 => 'LightSource',
3353
- 0x9209 => 'Flash',
3354
- 0x920a => 'FocalLength',
3355
- 0x920b => 'FlashEnergy',
3356
- 0x920c => 'SpatialFrequencyResponse',
3357
- 0x920d => 'Noise',
3358
- 0x920e => 'FocalPlaneXResolution',
3359
- 0x920f => 'FocalPlaneYResolution',
3360
- 0x9210 => 'FocalPlaneResolutionUnit',
3361
- 0x9211 => 'ImageNumber',
3362
- 0x9212 => 'SecurityClassification',
3363
- 0x9213 => 'ImageHistory',
3364
- 0x9214 => 'SubjectArea',
3365
- 0x9215 => 'ExposureIndex',
3366
- 0x9216 => 'TIFF-EPStandardID',
3367
- 0x9217 => 'SensingMethod',
3368
- 0x923a => 'CIP3DataFile',
3369
- 0x923b => 'CIP3Sheet',
3370
- 0x923c => 'CIP3Side',
3371
- 0x923f => 'StoNits',
3372
- 0x927c => 'MakerNote',
3373
- 0x9286 => 'UserComment',
3374
- 0x9290 => 'SubSecTime',
3375
- 0x9291 => 'SubSecTimeOriginal',
3376
- 0x9292 => 'SubSecTimeDigitized',
3377
- 0x932f => 'MSDocumentText',
3378
- 0x9330 => 'MSPropertySetStorage',
3379
- 0x9331 => 'MSDocumentTextPosition',
3380
- 0x935c => 'ImageSourceData',
3381
- 0x9400 => 'AmbientTemperature',
3382
- 0x9401 => 'Humidity',
3383
- 0x9402 => 'Pressure',
3384
- 0x9403 => 'WaterDepth',
3385
- 0x9404 => 'Acceleration',
3386
- 0x9405 => 'CameraElevationAngle',
3387
- 0x9c9b => 'XPTitle',
3388
- 0x9c9c => 'XPComment',
3389
- 0x9c9d => 'XPAuthor',
3390
- 0x9c9e => 'XPKeywords',
3391
- 0x9c9f => 'XPSubject',
3392
- 0xa000 => 'FlashpixVersion',
3393
- 0xa001 => 'ColorSpace',
3394
- 0xa002 => 'ExifImageWidth',
3395
- 0xa003 => 'ExifImageHeight',
3396
- 0xa004 => 'RelatedSoundFile',
3397
- 0xa005 => 'InteropOffset',
3398
- 0xa010 => 'SamsungRawPointersOffset',
3399
- 0xa011 => 'SamsungRawPointersLength',
3400
- 0xa101 => 'SamsungRawByteOrder',
3401
- 0xa102 => 'SamsungRawUnknown?',
3402
- 0xa20b => 'FlashEnergy',
3403
- 0xa20c => 'SpatialFrequencyResponse',
3404
- 0xa20d => 'Noise',
3405
- 0xa20e => 'FocalPlaneXResolution',
3406
- 0xa20f => 'FocalPlaneYResolution',
3407
- 0xa210 => 'FocalPlaneResolutionUnit',
3408
- 0xa211 => 'ImageNumber',
3409
- 0xa212 => 'SecurityClassification',
3410
- 0xa213 => 'ImageHistory',
3411
- 0xa214 => 'SubjectLocation',
3412
- 0xa215 => 'ExposureIndex',
3413
- 0xa216 => 'TIFF-EPStandardID',
3414
- 0xa217 => 'SensingMethod',
3415
- 0xa300 => 'FileSource',
3416
- 0xa301 => 'SceneType',
3417
- 0xa302 => 'CFAPattern',
3418
- 0xa401 => 'CustomRendered',
3419
- 0xa402 => 'ExposureMode',
3420
- 0xa403 => 'WhiteBalance',
3421
- 0xa404 => 'DigitalZoomRatio',
3422
- 0xa405 => 'FocalLengthIn35mmFormat',
3423
- 0xa406 => 'SceneCaptureType',
3424
- 0xa407 => 'GainControl',
3425
- 0xa408 => 'Contrast',
3426
- 0xa409 => 'Saturation',
3427
- 0xa40a => 'Sharpness',
3428
- 0xa40b => 'DeviceSettingDescription',
3429
- 0xa40c => 'SubjectDistanceRange',
3430
- 0xa420 => 'ImageUniqueID',
3431
- 0xa430 => 'OwnerName',
3432
- 0xa431 => 'SerialNumber',
3433
- 0xa432 => 'LensInfo',
3434
- 0xa433 => 'LensMake',
3435
- 0xa434 => 'LensModel',
3436
- 0xa435 => 'LensSerialNumber',
3437
- 0xa480 => 'GDALMetadata',
3438
- 0xa481 => 'GDALNoData',
3439
- 0xa500 => 'Gamma',
3440
- 0xafc0 => 'ExpandSoftware',
3441
- 0xafc1 => 'ExpandLens',
3442
- 0xafc2 => 'ExpandFilm',
3443
- 0xafc3 => 'ExpandFilterLens',
3444
- 0xafc4 => 'ExpandScanner',
3445
- 0xafc5 => 'ExpandFlashLamp',
3446
- 0xbc01 => 'PixelFormat',
3447
- 0xbc03 => 'Uncompressed',
3448
- 0xbc04 => 'ImageType',
3449
- 0xbc80 => 'ImageWidth',
3450
- 0xbc81 => 'ImageHeight',
3451
- 0xbc82 => 'WidthResolution',
3452
- 0xbc83 => 'HeightResolution',
3453
- 0xbcc0 => 'ImageOffset',
3454
- 0xbcc1 => 'ImageByteCount',
3455
- 0xbcc2 => 'AlphaOffset',
3456
- 0xbcc3 => 'AlphaByteCount',
3457
- 0xbcc4 => 'ImageDataDiscard',
3458
- 0xbcc5 => 'AlphaDataDiscard',
3459
- 0xc427 => 'OceScanjobDesc',
3460
- 0xc428 => 'OceApplicationSelector',
3461
- 0xc429 => 'OceIDNumber',
3462
- 0xc42a => 'OceImageLogic',
3463
- 0xc44f => 'Annotations',
3464
- 0xc4a5 => 'PrintIM',
3465
- 0xc573 => 'OriginalFileName',
3466
- 0xc580 => 'USPTOOriginalContentType',
3467
- 0xc5e0 => 'CR2CFAPattern',
3468
- 0xc612 => 'DNGVersion',
3469
- 0xc613 => 'DNGBackwardVersion',
3470
- 0xc614 => 'UniqueCameraModel',
3471
- 0xc615 => 'LocalizedCameraModel',
3472
- 0xc616 => 'CFAPlaneColor',
3473
- 0xc617 => 'CFALayout',
3474
- 0xc618 => 'LinearizationTable',
3475
- 0xc619 => 'BlackLevelRepeatDim',
3476
- 0xc61a => 'BlackLevel',
3477
- 0xc61b => 'BlackLevelDeltaH',
3478
- 0xc61c => 'BlackLevelDeltaV',
3479
- 0xc61d => 'WhiteLevel',
3480
- 0xc61e => 'DefaultScale',
3481
- 0xc61f => 'DefaultCropOrigin',
3482
- 0xc620 => 'DefaultCropSize',
3483
- 0xc621 => 'ColorMatrix1',
3484
- 0xc622 => 'ColorMatrix2',
3485
- 0xc623 => 'CameraCalibration1',
3486
- 0xc624 => 'CameraCalibration2',
3487
- 0xc625 => 'ReductionMatrix1',
3488
- 0xc626 => 'ReductionMatrix2',
3489
- 0xc627 => 'AnalogBalance',
3490
- 0xc628 => 'AsShotNeutral',
3491
- 0xc629 => 'AsShotWhiteXY',
3492
- 0xc62a => 'BaselineExposure',
3493
- 0xc62b => 'BaselineNoise',
3494
- 0xc62c => 'BaselineSharpness',
3495
- 0xc62d => 'BayerGreenSplit',
3496
- 0xc62e => 'LinearResponseLimit',
3497
- 0xc62f => 'CameraSerialNumber',
3498
- 0xc630 => 'DNGLensInfo',
3499
- 0xc631 => 'ChromaBlurRadius',
3500
- 0xc632 => 'AntiAliasStrength',
3501
- 0xc633 => 'ShadowScale',
3502
- 0xc640 => 'RawImageSegmentation',
3503
- 0xc65a => 'CalibrationIlluminant1',
3504
- 0xc65b => 'CalibrationIlluminant2',
3505
- 0xc65c => 'BestQualityScale',
3506
- 0xc65d => 'RawDataUniqueID',
3507
- 0xc660 => 'AliasLayerMetadata',
3508
- 0xc68b => 'OriginalRawFileName',
3509
- 0xc68c => 'OriginalRawFileData',
3510
- 0xc68d => 'ActiveArea',
3511
- 0xc68e => 'MaskedAreas',
3512
- 0xc68f => 'AsShotICCProfile',
3513
- 0xc690 => 'AsShotPreProfileMatrix',
3514
- 0xc691 => 'CurrentICCProfile',
3515
- 0xc692 => 'CurrentPreProfileMatrix',
3516
- 0xc6bf => 'ColorimetricReference',
3517
- 0xc6c5 => 'SRawType',
3518
- 0xc6d2 => 'PanasonicTitle',
3519
- 0xc6d3 => 'PanasonicTitle2',
3520
- 0xc6f3 => 'CameraCalibrationSig',
3521
- 0xc6f4 => 'ProfileCalibrationSig',
3522
- 0xc6f5 => 'ProfileIFD',
3523
- 0xc6f6 => 'AsShotProfileName',
3524
- 0xc6f7 => 'NoiseReductionApplied',
3525
- 0xc6f8 => 'ProfileName',
3526
- 0xc6f9 => 'ProfileHueSatMapDims',
3527
- 0xc6fa => 'ProfileHueSatMapData1',
3528
- 0xc6fb => 'ProfileHueSatMapData2',
3529
- 0xc6fc => 'ProfileToneCurve',
3530
- 0xc6fd => 'ProfileEmbedPolicy',
3531
- 0xc6fe => 'ProfileCopyright',
3532
- 0xc714 => 'ForwardMatrix1',
3533
- 0xc715 => 'ForwardMatrix2',
3534
- 0xc716 => 'PreviewApplicationName',
3535
- 0xc717 => 'PreviewApplicationVersion',
3536
- 0xc718 => 'PreviewSettingsName',
3537
- 0xc719 => 'PreviewSettingsDigest',
3538
- 0xc71a => 'PreviewColorSpace',
3539
- 0xc71b => 'PreviewDateTime',
3540
- 0xc71c => 'RawImageDigest',
3541
- 0xc71d => 'OriginalRawFileDigest',
3542
- 0xc71e => 'SubTileBlockSize',
3543
- 0xc71f => 'RowInterleaveFactor',
3544
- 0xc725 => 'ProfileLookTableDims',
3545
- 0xc726 => 'ProfileLookTableData',
3546
- 0xc740 => 'OpcodeList1',
3547
- 0xc741 => 'OpcodeList2',
3548
- 0xc74e => 'OpcodeList3',
3549
- 0xc761 => 'NoiseProfile',
3550
- 0xc763 => 'TimeCodes',
3551
- 0xc764 => 'FrameRate',
3552
- 0xc772 => 'TStop',
3553
- 0xc789 => 'ReelName',
3554
- 0xc791 => 'OriginalDefaultFinalSize',
3555
- 0xc792 => 'OriginalBestQualitySize',
3556
- 0xc793 => 'OriginalDefaultCropSize',
3557
- 0xc7a1 => 'CameraLabel',
3558
- 0xc7a3 => 'ProfileHueSatMapEncoding',
3559
- 0xc7a4 => 'ProfileLookTableEncoding',
3560
- 0xc7a5 => 'BaselineExposureOffset',
3561
- 0xc7a6 => 'DefaultBlackRender',
3562
- 0xc7a7 => 'NewRawImageDigest',
3563
- 0xc7a8 => 'RawToPreviewGain',
3564
- 0xc7b5 => 'DefaultUserCrop',
3565
- 0xea1c => 'Padding',
3566
- 0xea1d => 'OffsetSchema',
3567
- 0xfde8 => 'OwnerName',
3568
- 0xfde9 => 'SerialNumber',
3569
- 0xfdea => 'Lens',
3570
- 0xfe00 => 'KDC_IFD',
3571
- 0xfe4c => 'RawFile',
3572
- 0xfe4d => 'Converter',
3573
- 0xfe4e => 'WhiteBalance',
3574
- 0xfe51 => 'Exposure',
3575
- 0xfe52 => 'Shadows',
3576
- 0xfe53 => 'Brightness',
3577
- 0xfe54 => 'Contrast',
3578
- 0xfe55 => 'Saturation',
3579
- 0xfe56 => 'Sharpness',
3580
- 0xfe57 => 'Smoothness',
3581
- 0xfe58 => 'MoireFilter',
3582
 
3583
  );
3584
  }
3585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3586
  // Init
3587
  $result = '';
3588
 
@@ -3627,12 +4231,27 @@ static $commontags;
3627
  }
3628
  }
3629
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3630
  // Not found? Find generic tag name
3631
  if ( ! $result ) {
3632
- $result = exif_tagname( $tag );
 
3633
  if ( ! $result ) {
3634
- wppa_log( 'dbg', 'exif_tagname found nothing for ' . sprintf( '0x%04X', $tag ) );
3635
- $result = sprintf( 'UndefinedTag:0x%04X', $tag );
3636
  }
3637
  }
3638
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
+ * version 6.8.01
7
  *
8
  *
9
  */
159
  }
160
 
161
  // Remove untranslated
162
+ $groups = array( 'E#', 'F#', 'G#' );
163
+ foreach( $groups as $group ) {
164
+ $pos = strpos( $temp, $group );
165
+ while ( $pos !== false ) {
166
+ $tmp = substr( $temp, 0, $pos ) . '<span title="' . esc_attr( __( 'No data', 'wp-photo-album-plus' ) ) . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>' . substr( $temp, $pos+6 );
167
+ $temp = $tmp;
168
+ $pos = strpos( $temp, $group );
169
+ }
170
  }
171
 
172
  // Return result
176
  function wppa_format_exif( $tag, $data, $brand = '' ) {
177
  global $wppa_exif_error_output;
178
 
179
+ if ( true || $data !== '' ) {
180
+
181
+ // If rational, simplify it.
182
+ if ( wppa_is_valid_rational( $data, false ) ) {
183
+ $data = wppa_simplify_rational( $data );
184
+ }
185
+
186
+ // If array, make it readable
187
+ if ( is_serialized( $data ) ) {
188
+ $data_arr = unserialize( $data );
189
+ $data = implode( ', ', $data_arr );
190
+ }
191
+ else {
192
+ $data_arr = null;
193
+ }
194
+
195
+ // Default:
196
+ $result = $data;
197
+
198
  switch ( $tag ) {
199
 
200
  case 'E#0001': // InteropIndex / CanonCameraSettings (Canon)
201
+ if ( $brand == 'CANON' ) { // CanonCameraSettings (Canon)
202
+
 
 
 
 
 
 
 
 
 
 
 
203
  }
204
+ else { // InteropIndex
205
+ switch( $data ) {
206
+ case 'R03': $result = __( 'R03 - DCF option file (Adobe RGB)', 'wp-photo-album-plus' ); break;
207
+ case 'R98': $result = __( 'R98 - DCF basic file (sRGB)', 'wp-photo-album-plus' ); break;
208
+ case 'THM': $result = __( 'THM - DCF thumbnail file', 'wp-photo-album-plus' ); break;
209
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
210
+ }
211
+ }
212
+ return $result;
213
 
214
  case 'E#0002': // CanonFocalLength / DeviceType
215
+ if ( $brand == 'SAMSUNG' ) { // DeviceType
216
+ switch( $data ) {
217
+ case 0x1000: $result = 'Compact Digital Camera'; break;
218
+ case 0x2000: $result = 'High-end NX Camera'; break;
219
+ case 0x3000: $result = 'HXM Video Camera'; break;
220
+ case 0x12000: $result = 'Cell Phone'; break;
221
+ case 0x300000: $result = 'SMX Video Camera'; break;
222
+ default: $result = $data;
223
+ }
224
+ }
225
+ if ( $brand == 'CANON' ) { // CanonFocalLength
226
+ if ( is_array( $data_arr ) && count( $data_arr ) == 4 ) {
227
+
228
+ // 0
229
+ $result = 'FocalType: ';
230
+ switch( $data_arr[0] ) {
231
+ case 0: $result .= 'Fixed'; break;
232
+ case 1: $result .= 'Zoom'; break;
233
+ default: $result .= '?';
234
  }
235
+ $result .= ', ';
236
+
237
+ // 1
238
+ $result .= 'Length: ' . $data_arr[1] . ', ';
239
+
240
+ // 2
241
+ $result .= 'XSize: ' . $data_arr[2] . ', ';
242
+
243
+ // 3
244
+ $result .= 'YSize: ' . $data_arr[3];
245
+ }
246
 
 
 
 
 
247
  }
248
+ return $result;
249
 
250
  case 'E#0003': // CanonFlashInfo? / SamsungModelID
251
+ if ( $brand == 'CANON' ) { // CanonFlashInfo?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
 
 
 
 
 
253
  }
254
+ if ( $brand == 'SAMSUNG' ) { // SamsungModelID
255
+ switch( $data ) {
256
+ case 0x100101c: $result = 'NX10'; break;
257
+ case 0x1001226: $result = 'HMX-S15BP'; break;
258
+ case 0x1001233: $result = 'HMX-Q10'; break;
259
+ case 0x1001234: $result = 'HMX-H304'; break;
260
+ case 0x100130c: $result = 'NX100'; break;
261
+ case 0x1001327: $result = 'NX11'; break;
262
+ case 0x170104b: $result = 'ES65, ES67 / VLUU ES65, ES67 / SL50'; break;
263
+ case 0x170104e: $result = 'ES70, ES71 / VLUU ES70, ES71 / SL600'; break;
264
+ case 0x1701052: $result = 'ES73 / VLUU ES73 / SL605'; break;
265
+ case 0x1701055: $result = 'ES25, ES27 / VLUU ES25, ES27 / SL45'; break;
266
+ case 0x1701300: $result = 'ES28 / VLUU ES28'; break;
267
+ case 0x1701303: $result = 'ES74,ES75,ES78 / VLUU ES75,ES78'; break;
268
+ case 0x2001046: $result = 'PL150 / VLUU PL150 / TL210 / PL151'; break;
269
+ case 0x2001048: $result = 'PL100 / TL205 / VLUU PL100 / PL101'; break;
270
+ case 0x2001311: $result = 'PL120,PL121 / VLUU PL120,PL121'; break;
271
+ case 0x2001315: $result = 'PL170,PL171 / VLUUPL170,PL171'; break;
272
+ case 0x200131e: $result = 'PL210, PL211 / VLUU PL210, PL211'; break;
273
+ case 0x2701317: $result = 'PL20,PL21 / VLUU PL20,PL21'; break;
274
+ case 0x2a0001b: $result = 'WP10 / VLUU WP10 / AQ100'; break;
275
+ case 0x3000000: $result = 'Various Models (0x3000000)'; break;
276
+ case 0x3a00018: $result = 'Various Models (0x3a00018)'; break;
277
+ case 0x400101f: $result = 'ST1000 / ST1100 / VLUU ST1000 / CL65'; break;
278
+ case 0x4001022: $result = 'ST550 / VLUU ST550 / TL225'; break;
279
+ case 0x4001025: $result = 'Various Models (0x4001025)'; break;
280
+ case 0x400103e: $result = 'VLUU ST5500, ST5500, CL80'; break;
281
+ case 0x4001041: $result = 'VLUU ST5000, ST5000, TL240'; break;
282
+ case 0x4001043: $result = 'ST70 / VLUU ST70 / ST71'; break;
283
+ case 0x400130a: $result = 'Various Models (0x400130a)'; break;
284
+ case 0x400130e: $result = 'ST90,ST91 / VLUU ST90,ST91'; break;
285
+ case 0x4001313: $result = 'VLUU ST95, ST95'; break;
286
+ case 0x4a00015: $result = 'VLUU ST60'; break;
287
+ case 0x4a0135b: $result = 'ST30, ST65 / VLUU ST65 / ST67'; break;
288
+ case 0x5000000: $result = 'Various Models (0x5000000)'; break;
289
+ case 0x5001038: $result = 'Various Models (0x5001038)'; break;
290
+ case 0x500103a: $result = 'WB650 / VLUU WB650 / WB660'; break;
291
+ case 0x500103c: $result = 'WB600 / VLUU WB600 / WB610'; break;
292
+ case 0x500133e: $result = 'WB150 / WB150F / WB152 / WB152F / WB151'; break;
293
+ case 0x5a0000f: $result = 'WB5000 / HZ25W'; break;
294
+ case 0x6001036: $result = 'EX1'; break;
295
+ case 0x700131c: $result = 'VLUU SH100, SH100'; break;
296
+ case 0x27127002: $result = 'SMX-C20N'; break;
297
+ default: $result = '?';
298
+ }
299
+ }
300
+ return $result;
301
 
302
  case 'E#0004': // CanonShotInfo / Quality (Nikon)
303
  case 'E#0005': // CanonPanorama / WhiteBalance (Nikon)
308
  case 'E#000A': // UnknownD30 (Canon)
309
  case 'E#000B': // WhiteBalanceFineTune (Nikon)
310
  case 'E#000C': // SerialNumber (Canon) / WB_RBLevels (Nikon)
311
+ return $result;
312
+
313
  case 'E#000D': // CanonCameraInfo / ProgramShift (Nikon)
314
+ if ( $brand == 'CANON' ) {
315
+ str_replace( 'CanonCanon', 'Canon', $result );
316
+ }
317
+ return $result;
318
+
319
  case 'E#000E': // CanonFileLength / ExposureDifference (Nikon)
320
+ if ( $brand == 'CANON' ) {
321
+ $result .= ' bytes.';
322
+ }
323
+ return $result;
324
+
325
  case 'E#000F': // CustomFunctions (Canon) / ISOSelection (Nikon)
 
326
  return $result;
 
327
 
328
  case 'E#0010': // CanonModelID (Canon) / DataDump (Nikon)
329
+ if ( $brand == 'CANON' ) { // CanonModelID (Canon)
330
+ $data = dechex( $data );
331
+ switch( $data ) {
332
+ case '1010000': $result = 'PowerShot A30'; break;
333
+ case '1040000': $result = 'PowerShot S300 / Digital IXUS 300 / IXY Digital 300'; break;
334
+ case '1060000': $result = 'PowerShot A20'; break;
335
+ case '1080000': $result = 'PowerShot A10'; break;
336
+ case '1090000': $result = 'PowerShot S110 / Digital IXUS v / IXY Digital 200'; break;
337
+ case '1100000': $result = 'PowerShot G2'; break;
338
+ case '1110000': $result = 'PowerShot S40'; break;
339
+ case '1120000': $result = 'PowerShot S30'; break;
340
+ case '1130000': $result = 'PowerShot A40'; break;
341
+ case '1140000': $result = 'EOS D30'; break;
342
+ case '1150000': $result = 'PowerShot A100'; break;
343
+ case '1160000': $result = 'PowerShot S200 / Digital IXUS v2 / IXY Digital 200a'; break;
344
+ case '1170000': $result = 'PowerShot A200'; break;
345
+ case '1180000': $result = 'PowerShot S330 / Digital IXUS 330 / IXY Digital 300a'; break;
346
+ case '1190000': $result = 'PowerShot G3'; break;
347
+ case '1210000': $result = 'PowerShot S45'; break;
348
+ case '1230000': $result = 'PowerShot SD100 / Digital IXUS II / IXY Digital 30'; break;
349
+ case '1240000': $result = 'PowerShot S230 / Digital IXUS v3 / IXY Digital 320'; break;
350
+ case '1250000': $result = 'PowerShot A70'; break;
351
+ case '1260000': $result = 'PowerShot A60'; break;
352
+ case '1270000': $result = 'PowerShot S400 / Digital IXUS 400 / IXY Digital 400'; break;
353
+ case '1290000': $result = 'PowerShot G5'; break;
354
+ case '1300000': $result = 'PowerShot A300'; break;
355
+ case '1310000': $result = 'PowerShot S50'; break;
356
+ case '1340000': $result = 'PowerShot A80'; break;
357
+ case '1350000': $result = 'PowerShot SD10 / Digital IXUS i / IXY Digital L'; break;
358
+ case '1360000': $result = 'PowerShot S1 IS'; break;
359
+ case '1370000': $result = 'PowerShot Pro1'; break;
360
+ case '1380000': $result = 'PowerShot S70'; break;
361
+ case '1390000': $result = 'PowerShot S60'; break;
362
+ case '1400000': $result = 'PowerShot G6'; break;
363
+ case '1410000': $result = 'PowerShot S500 / Digital IXUS 500 / IXY Digital 500'; break;
364
+ case '1420000': $result = 'PowerShot A75'; break;
365
+ case '1440000': $result = 'PowerShot SD110 / Digital IXUS IIs / IXY Digital 30a'; break;
366
+ case '1450000': $result = 'PowerShot A400'; break;
367
+ case '1470000': $result = 'PowerShot A310'; break;
368
+ case '1490000': $result = 'PowerShot A85'; break;
369
+ case '1520000': $result = 'PowerShot S410 / Digital IXUS 430 / IXY Digital 450'; break;
370
+ case '1530000': $result = 'PowerShot A95'; break;
371
+ case '1540000': $result = 'PowerShot SD300 / Digital IXUS 40 / IXY Digital 50'; break;
372
+ case '1550000': $result = 'PowerShot SD200 / Digital IXUS 30 / IXY Digital 40'; break;
373
+ case '1560000': $result = 'PowerShot A520'; break;
374
+ case '1570000': $result = 'PowerShot A510'; break;
375
+ case '1590000': $result = 'PowerShot SD20 / Digital IXUS i5 / IXY Digital L2'; break;
376
+ case '1640000': $result = 'PowerShot S2 IS'; break;
377
+ case '1650000': $result = 'PowerShot SD430 / Digital IXUS Wireless / IXY Digital Wireless'; break;
378
+ case '1660000': $result = 'PowerShot SD500 / Digital IXUS 700 / IXY Digital 600'; break;
379
+ case '1668000': $result = 'EOS D60'; break;
380
+ case '1700000': $result = 'PowerShot SD30 / Digital IXUS i Zoom / IXY Digital L3'; break;
381
+ case '1740000': $result = 'PowerShot A430'; break;
382
+ case '1750000': $result = 'PowerShot A410'; break;
383
+ case '1760000': $result = 'PowerShot S80'; break;
384
+ case '1780000': $result = 'PowerShot A620'; break;
385
+ case '1790000': $result = 'PowerShot A610'; break;
386
+ case '1800000': $result = 'PowerShot SD630 / Digital IXUS 65 / IXY Digital 80'; break;
387
+ case '1810000': $result = 'PowerShot SD450 / Digital IXUS 55 / IXY Digital 60'; break;
388
+ case '1820000': $result = 'PowerShot TX1'; break;
389
+ case '1870000': $result = 'PowerShot SD400 / Digital IXUS 50 / IXY Digital 55'; break;
390
+ case '1880000': $result = 'PowerShot A420'; break;
391
+ case '1890000': $result = 'PowerShot SD900 / Digital IXUS 900 Ti / IXY Digital 1000'; break;
392
+ case '1900000': $result = 'PowerShot SD550 / Digital IXUS 750 / IXY Digital 700'; break;
393
+ case '1920000': $result = 'PowerShot A700'; break;
394
+ case '1940000': $result = 'PowerShot SD700 IS / Digital IXUS 800 IS / IXY Digital 800 IS'; break;
395
+ case '1950000': $result = 'PowerShot S3 IS'; break;
396
+ case '1960000': $result = 'PowerShot A540'; break;
397
+ case '1970000': $result = 'PowerShot SD600 / Digital IXUS 60 / IXY Digital 70'; break;
398
+ case '1980000': $result = 'PowerShot G7'; break;
399
+ case '1990000': $result = 'PowerShot A530'; break;
400
+ case '2000000': $result = 'PowerShot SD800 IS / Digital IXUS 850 IS / IXY Digital 900 IS'; break;
401
+ case '2010000': $result = 'PowerShot SD40 / Digital IXUS i7 / IXY Digital L4'; break;
402
+ case '2020000': $result = 'PowerShot A710 IS'; break;
403
+ case '2030000': $result = 'PowerShot A640'; break;
404
+ case '2040000': $result = 'PowerShot A630'; break;
405
+ case '2090000': $result = 'PowerShot S5 IS'; break;
406
+ case '2100000': $result = 'PowerShot A460'; break;
407
+ case '2120000': $result = 'PowerShot SD850 IS / Digital IXUS 950 IS / IXY Digital 810 IS'; break;
408
+ case '2130000': $result = 'PowerShot A570 IS'; break;
409
+ case '2140000': $result = 'PowerShot A560'; break;
410
+ case '2150000': $result = 'PowerShot SD750 / Digital IXUS 75 / IXY Digital 90'; break;
411
+ case '2160000': $result = 'PowerShot SD1000 / Digital IXUS 70 / IXY Digital 10'; break;
412
+ case '2180000': $result = 'PowerShot A550'; break;
413
+ case '2190000': $result = 'PowerShot A450'; break;
414
+ case '2230000': $result = 'PowerShot G9'; break;
415
+ case '2240000': $result = 'PowerShot A650 IS'; break;
416
+ case '2260000': $result = 'PowerShot A720 IS'; break;
417
+ case '2290000': $result = 'PowerShot SX100 IS'; break;
418
+ case '2300000': $result = 'PowerShot SD950 IS / Digital IXUS 960 IS / IXY Digital 2000 IS'; break;
419
+ case '2310000': $result = 'PowerShot SD870 IS / Digital IXUS 860 IS / IXY Digital 910 IS'; break;
420
+ case '2320000': $result = 'PowerShot SD890 IS / Digital IXUS 970 IS / IXY Digital 820 IS'; break;
421
+ case '2360000': $result = 'PowerShot SD790 IS / Digital IXUS 90 IS / IXY Digital 95 IS'; break;
422
+ case '2370000': $result = 'PowerShot SD770 IS / Digital IXUS 85 IS / IXY Digital 25 IS'; break;
423
+ case '2380000': $result = 'PowerShot A590 IS'; break;
424
+ case '2390000': $result = 'PowerShot A580'; break;
425
+ case '2420000': $result = 'PowerShot A470'; break;
426
+ case '2430000': $result = 'PowerShot SD1100 IS / Digital IXUS 80 IS / IXY Digital 20 IS'; break;
427
+ case '2460000': $result = 'PowerShot SX1 IS'; break;
428
+ case '2470000': $result = 'PowerShot SX10 IS'; break;
429
+ case '2480000': $result = 'PowerShot A1000 IS'; break;
430
+ case '2490000': $result = 'PowerShot G10'; break;
431
+ case '2510000': $result = 'PowerShot A2000 IS'; break;
432
+ case '2520000': $result = 'PowerShot SX110 IS'; break;
433
+ case '2530000': $result = 'PowerShot SD990 IS / Digital IXUS 980 IS / IXY Digital 3000 IS'; break;
434
+ case '2540000': $result = 'PowerShot SD880 IS / Digital IXUS 870 IS / IXY Digital 920 IS'; break;
435
+ case '2550000': $result = 'PowerShot E1'; break;
436
+ case '2560000': $result = 'PowerShot D10'; break;
437
+ case '2570000': $result = 'PowerShot SD960 IS / Digital IXUS 110 IS / IXY Digital 510 IS'; break;
438
+ case '2580000': $result = 'PowerShot A2100 IS'; break;
439
+ case '2590000': $result = 'PowerShot A480'; break;
440
+ case '2600000': $result = 'PowerShot SX200 IS'; break;
441
+ case '2610000': $result = 'PowerShot SD970 IS / Digital IXUS 990 IS / IXY Digital 830 IS'; break;
442
+ case '2620000': $result = 'PowerShot SD780 IS / Digital IXUS 100 IS / IXY Digital 210 IS'; break;
443
+ case '2630000': $result = 'PowerShot A1100 IS'; break;
444
+ case '2640000': $result = 'PowerShot SD1200 IS / Digital IXUS 95 IS / IXY Digital 110 IS'; break;
445
+ case '2700000': $result = 'PowerShot G11'; break;
446
+ case '2710000': $result = 'PowerShot SX120 IS'; break;
447
+ case '2720000': $result = 'PowerShot S90'; break;
448
+ case '2750000': $result = 'PowerShot SX20 IS'; break;
449
+ case '2760000': $result = 'PowerShot SD980 IS / Digital IXUS 200 IS / IXY Digital 930 IS'; break;
450
+ case '2770000': $result = 'PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS'; break;
451
+ case '2800000': $result = 'PowerShot A495'; break;
452
+ case '2810000': $result = 'PowerShot A490'; break;
453
+ case '2820000': $result = 'PowerShot A3100/A3150 IS'; break;
454
+ case '2830000': $result = 'PowerShot A3000 IS'; break;
455
+ case '2840000': $result = 'PowerShot SD1400 IS / IXUS 130 / IXY 400F'; break;
456
+ case '2850000': $result = 'PowerShot SD1300 IS / IXUS 105 / IXY 200F'; break;
457
+ case '2860000': $result = 'PowerShot SD3500 IS / IXUS 210 / IXY 10S'; break;
458
+ case '2870000': $result = 'PowerShot SX210 IS'; break;
459
+ case '2880000': $result = 'PowerShot SD4000 IS / IXUS 300 HS / IXY 30S'; break;
460
+ case '2890000': $result = 'PowerShot SD4500 IS / IXUS 1000 HS / IXY 50S'; break;
461
+ case '2920000': $result = 'PowerShot G12'; break;
462
+ case '2930000': $result = 'PowerShot SX30 IS'; break;
463
+ case '2940000': $result = 'PowerShot SX130 IS'; break;
464
+ case '2950000': $result = 'PowerShot S95'; break;
465
+ case '2980000': $result = 'PowerShot A3300 IS'; break;
466
+ case '2990000': $result = 'PowerShot A3200 IS'; break;
467
+ case '3000000': $result = 'PowerShot ELPH 500 HS / IXUS 310 HS / IXY 31S'; break;
468
+ case '3010000': $result = 'PowerShot Pro90 IS'; break;
469
+ case '3010001': $result = 'PowerShot A800'; break;
470
+ case '3020000': $result = 'PowerShot ELPH 100 HS / IXUS 115 HS / IXY 210F'; break;
471
+ case '3030000': $result = 'PowerShot SX230 HS'; break;
472
+ case '3040000': $result = 'PowerShot ELPH 300 HS / IXUS 220 HS / IXY 410F'; break;
473
+ case '3050000': $result = 'PowerShot A2200'; break;
474
+ case '3060000': $result = 'PowerShot A1200'; break;
475
+ case '3070000': $result = 'PowerShot SX220 HS'; break;
476
+ case '3080000': $result = 'PowerShot G1 X'; break;
477
+ case '3090000': $result = 'PowerShot SX150 IS'; break;
478
+ case '3100000': $result = 'PowerShot ELPH 510 HS / IXUS 1100 HS / IXY 51S'; break;
479
+ case '3110000': $result = 'PowerShot S100 (new)'; break;
480
+ case '3120000': $result = 'PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F'; break;
481
+ case '3130000': $result = 'PowerShot SX40 HS'; break;
482
+ case '3140000': $result = 'IXY 32S'; break;
483
+ case '3160000': $result = 'PowerShot A1300'; break;
484
+ case '3170000': $result = 'PowerShot A810'; break;
485
+ case '3180000': $result = 'PowerShot ELPH 320 HS / IXUS 240 HS / IXY 420F'; break;
486
+ case '3190000': $result = 'PowerShot ELPH 110 HS / IXUS 125 HS / IXY 220F'; break;
487
+ case '3200000': $result = 'PowerShot D20'; break;
488
+ case '3210000': $result = 'PowerShot A4000 IS'; break;
489
+ case '3220000': $result = 'PowerShot SX260 HS'; break;
490
+ case '3230000': $result = 'PowerShot SX240 HS'; break;
491
+ case '3240000': $result = 'PowerShot ELPH 530 HS / IXUS 510 HS / IXY 1'; break;
492
+ case '3250000': $result = 'PowerShot ELPH 520 HS / IXUS 500 HS / IXY 3'; break;
493
+ case '3260000': $result = 'PowerShot A3400 IS'; break;
494
+ case '3270000': $result = 'PowerShot A2400 IS'; break;
495
+ case '3280000': $result = 'PowerShot A2300'; break;
496
+ case '3330000': $result = 'PowerShot G15'; break;
497
+ case '3340000': $result = 'PowerShot SX50 HS'; break;
498
+ case '3350000': $result = 'PowerShot SX160 IS'; break;
499
+ case '3360000': $result = 'PowerShot S110 (new)'; break;
500
+ case '3370000': $result = 'PowerShot SX500 IS'; break;
501
+ case '3380000': $result = 'PowerShot N'; break;
502
+ case '3390000': $result = 'IXUS 245 HS / IXY 430F'; break;
503
+ case '3400000': $result = 'PowerShot SX280 HS'; break;
504
+ case '3410000': $result = 'PowerShot SX270 HS'; break;
505
+ case '3420000': $result = 'PowerShot A3500 IS'; break;
506
+ case '3430000': $result = 'PowerShot A2600'; break;
507
+ case '3440000': $result = 'PowerShot SX275 HS'; break;
508
+ case '3450000': $result = 'PowerShot A1400'; break;
509
+ case '3460000': $result = 'PowerShot ELPH 130 IS / IXUS 140 / IXY 110F'; break;
510
+ case '3470000': $result = 'PowerShot ELPH 115/120 IS / IXUS 132/135 / IXY 90F/100F'; break;
511
+ case '3490000': $result = 'PowerShot ELPH 330 HS / IXUS 255 HS / IXY 610F'; break;
512
+ case '3510000': $result = 'PowerShot A2500'; break;
513
+ case '3540000': $result = 'PowerShot G16'; break;
514
+ case '3550000': $result = 'PowerShot S120'; break;
515
+ case '3560000': $result = 'PowerShot SX170 IS'; break;
516
+ case '3580000': $result = 'PowerShot SX510 HS'; break;
517
+ case '3590000': $result = 'PowerShot S200 (new)'; break;
518
+ case '3600000': $result = 'IXY 620F'; break;
519
+ case '3610000': $result = 'PowerShot N100'; break;
520
+ case '3640000': $result = 'PowerShot G1 X Mark II'; break;
521
+ case '3650000': $result = 'PowerShot D30'; break;
522
+ case '3660000': $result = 'PowerShot SX700 HS'; break;
523
+ case '3670000': $result = 'PowerShot SX600 HS'; break;
524
+ case '3680000': $result = 'PowerShot ELPH 140 IS / IXUS 150 / IXY 130'; break;
525
+ case '3690000': $result = 'PowerShot ELPH 135 / IXUS 145 / IXY 120'; break;
526
+ case '3700000': $result = 'PowerShot ELPH 340 HS / IXUS 265 HS / IXY 630'; break;
527
+ case '3710000': $result = 'PowerShot ELPH 150 IS / IXUS 155 / IXY 140'; break;
528
+ case '3740000': $result = 'EOS M3'; break;
529
+ case '3750000': $result = 'PowerShot SX60 HS'; break;
530
+ case '3760000': $result = 'PowerShot SX520 HS'; break;
531
+ case '3770000': $result = 'PowerShot SX400 IS'; break;
532
+ case '3780000': $result = 'PowerShot G7 X'; break;
533
+ case '3790000': $result = 'PowerShot N2'; break;
534
+ case '3800000': $result = 'PowerShot SX530 HS'; break;
535
+ case '3820000': $result = 'PowerShot SX710 HS'; break;
536
+ case '3830000': $result = 'PowerShot SX610 HS'; break;
537
+ case '3840000': $result = 'EOS M10'; break;
538
+ case '3850000': $result = 'PowerShot G3 X'; break;
539
+ case '3860000': $result = 'PowerShot ELPH 165 HS / IXUS 165 / IXY 160'; break;
540
+ case '3870000': $result = 'PowerShot ELPH 160 / IXUS 160'; break;
541
+ case '3880000': $result = 'PowerShot ELPH 350 HS / IXUS 275 HS / IXY 640'; break;
542
+ case '3890000': $result = 'PowerShot ELPH 170 IS / IXUS 170'; break;
543
+ case '3910000': $result = 'PowerShot SX410 IS'; break;
544
+ case '3930000': $result = 'PowerShot G9 X'; break;
545
+ case '3940000': $result = 'EOS M5'; break;
546
+ case '3950000': $result = 'PowerShot G5 X'; break;
547
+ case '3970000': $result = 'PowerShot G7 X Mark II'; break;
548
+ case '3980000': $result = 'EOS M100'; break;
549
+ case '3990000': $result = 'PowerShot ELPH 360 HS / IXUS 285 HS / IXY 650'; break;
550
+ case '4010000': $result = 'PowerShot SX540 HS'; break;
551
+ case '4020000': $result = 'PowerShot SX420 IS'; break;
552
+ case '4030000': $result = 'PowerShot ELPH 190 IS / IXUS 180 / IXY 190'; break;
553
+ case '4040000': $result = 'PowerShot G1'; break;
554
+ case '4040001': $result = 'IXY 180'; break;
555
+ case '4050000': $result = 'PowerShot SX720 HS'; break;
556
+ case '4060000': $result = 'PowerShot SX620 HS'; break;
557
+ case '4070000': $result = 'EOS M6'; break;
558
+ case '4100000': $result = 'PowerShot G9 X Mark II'; break;
559
+ case '4150000': $result = 'PowerShot ELPH 185 / IXUS 185 / IXY 200'; break;
560
+ case '4160000': $result = 'PowerShot SX430 IS'; break;
561
+ case '4170000': $result = 'PowerShot SX730 HS'; break;
562
+ case '4180000': $result = 'PowerShot G1 X Mark III'; break;
563
+ case '6040000': $result = 'PowerShot S100 / Digital IXUS / IXY Digital'; break;
564
+ case '4007d673': $result = 'DC19/DC21/DC22'; break;
565
+ case '4007d674': $result = 'XH A1'; break;
566
+ case '4007d675': $result = 'HV10'; break;
567
+ case '4007d676': $result = 'MD130/MD140/MD150/MD160/ZR850'; break;
568
+ case '4007d777': $result = 'DC50'; break;
569
+ case '4007d778': $result = 'HV20'; break;
570
+ case '4007d779': $result = 'DC211'; break;
571
+ case '4007d77a': $result = 'HG10'; break;
572
+ case '4007d77b': $result = 'HR10'; break;
573
+ case '4007d77d': $result = 'MD255/ZR950'; break;
574
+ case '4007d81c': $result = 'HF11'; break;
575
+ case '4007d878': $result = 'HV30'; break;
576
+ case '4007d87c': $result = 'XH A1S'; break;
577
+ case '4007d87e': $result = 'DC301/DC310/DC311/DC320/DC330'; break;
578
+ case '4007d87f': $result = 'FS100'; break;
579
+ case '4007d880': $result = 'HF10'; break;
580
+ case '4007d882': $result = 'HG20/HG21'; break;
581
+ case '4007d925': $result = 'HF21'; break;
582
+ case '4007d926': $result = 'HF S11'; break;
583
+ case '4007d978': $result = 'HV40'; break;
584
+ case '4007d987': $result = 'DC410/DC411/DC420'; break;
585
+ case '4007d988': $result = 'FS19/FS20/FS21/FS22/FS200'; break;
586
+ case '4007d989': $result = 'HF20/HF200'; break;
587
+ case '4007d98a': $result = 'HF S10/S100'; break;
588
+ case '4007da8e': $result = 'HF R10/R16/R17/R18/R100/R106'; break;
589
+ case '4007da8f': $result = 'HF M30/M31/M36/M300/M306'; break;
590
+ case '4007da90': $result = 'HF S20/S21/S200'; break;
591
+ case '4007da92': $result = 'FS31/FS36/FS37/FS300/FS305/FS306/FS307'; break;
592
+ case '4007dca0': $result = 'EOS C300'; break;
593
+ case '4007dda9': $result = 'HF G25'; break;
594
+ case '4007dfb4': $result = 'XC10'; break;
595
+ case '80000001': $result = 'EOS-1D'; break;
596
+ case '80000167': $result = 'EOS-1DS'; break;
597
+ case '80000168': $result = 'EOS 10D'; break;
598
+ case '80000169': $result = 'EOS-1D Mark III'; break;
599
+ case '80000170': $result = 'EOS Digital Rebel / 300D / Kiss Digital'; break;
600
+ case '80000174': $result = 'EOS-1D Mark II'; break;
601
+ case '80000175': $result = 'EOS 20D'; break;
602
+ case '80000176': $result = 'EOS Digital Rebel XSi / 450D / Kiss X2'; break;
603
+ case '80000188': $result = 'EOS-1Ds Mark II'; break;
604
+ case '80000189': $result = 'EOS Digital Rebel XT / 350D / Kiss Digital N'; break;
605
+ case '80000190': $result = 'EOS 40D'; break;
606
+ case '80000213': $result = 'EOS 5D'; break;
607
+ case '80000215': $result = 'EOS-1Ds Mark III'; break;
608
+ case '80000218': $result = 'EOS 5D Mark II'; break;
609
+ case '80000219': $result = 'WFT-E1'; break;
610
+ case '80000232': $result = 'EOS-1D Mark II N'; break;
611
+ case '80000234': $result = 'EOS 30D'; break;
612
+ case '80000236': $result = 'EOS Digital Rebel XTi / 400D / Kiss Digital X'; break;
613
+ case '80000241': $result = 'WFT-E2'; break;
614
+ case '80000246': $result = 'WFT-E3'; break;
615
+ case '80000250': $result = 'EOS 7D'; break;
616
+ case '80000252': $result = 'EOS Rebel T1i / 500D / Kiss X3'; break;
617
+ case '80000254': $result = 'EOS Rebel XS / 1000D / Kiss F'; break;
618
+ case '80000261': $result = 'EOS 50D'; break;
619
+ case '80000269': $result = 'EOS-1D X'; break;
620
+ case '80000270': $result = 'EOS Rebel T2i / 550D / Kiss X4'; break;
621
+ case '80000271': $result = 'WFT-E4'; break;
622
+ case '80000273': $result = 'WFT-E5'; break;
623
+ case '80000281': $result = 'EOS-1D Mark IV'; break;
624
+ case '80000285': $result = 'EOS 5D Mark III'; break;
625
+ case '80000286': $result = 'EOS Rebel T3i / 600D / Kiss X5'; break;
626
+ case '80000287': $result = 'EOS 60D'; break;
627
+ case '80000288': $result = 'EOS Rebel T3 / 1100D / Kiss X50'; break;
628
+ case '80000289': $result = 'EOS 7D Mark II'; break;
629
+ case '80000297': $result = 'WFT-E2 II'; break;
630
+ case '80000298': $result = 'WFT-E4 II'; break;
631
+ case '80000301': $result = 'EOS Rebel T4i / 650D / Kiss X6i'; break;
632
+ case '80000302': $result = 'EOS 6D'; break;
633
+ case '80000324': $result = 'EOS-1D C'; break;
634
+ case '80000325': $result = 'EOS 70D'; break;
635
+ case '80000326': $result = 'EOS Rebel T5i / 700D / Kiss X7i'; break;
636
+ case '80000327': $result = 'EOS Rebel T5 / 1200D / Kiss X70'; break;
637
+ case '80000328': $result = 'EOS-1D X MARK II'; break;
638
+ case '80000331': $result = 'EOS M'; break;
639
+ case '80000346': $result = 'EOS Rebel SL1 / 100D / Kiss X7'; break;
640
+ case '80000347': $result = 'EOS Rebel T6s / 760D / 8000D'; break;
641
+ case '80000349': $result = 'EOS 5D Mark IV'; break;
642
+ case '80000350': $result = 'EOS 80D'; break;
643
+ case '80000355': $result = 'EOS M2'; break;
644
+ case '80000382': $result = 'EOS 5DS'; break;
645
+ case '80000393': $result = 'EOS Rebel T6i / 750D / Kiss X8i'; break;
646
+ case '80000401': $result = 'EOS 5DS R'; break;
647
+ case '80000404': $result = 'EOS Rebel T6 / 1300D / Kiss X80'; break;
648
+ case '80000405': $result = 'EOS Rebel T7i / 800D / Kiss X9i'; break;
649
+ case '80000406': $result = 'EOS 6D Mark II'; break;
650
+ case '80000408': $result = 'EOS 77D / 9000D'; break;
651
+ case '80000417': $result = 'EOS Rebel SL2 / 200D / Kiss X9'; break;
652
+ default: $result = '?';
653
+ }
 
 
 
 
 
 
 
 
 
 
 
 
654
  }
655
+ if ( $brand == 'NIKON' ) { // DataDump (Nikon)
656
 
657
+ }
658
+ return $result;
 
659
 
660
+ case 'E#0011': // MovieInfo / OrientationInfo
661
+ if ( $brand == 'SAMSUNG' ) { // OrientationInfo
 
662
 
663
+ if ( ! wppa_is_valid_rational( $data ) ) {
664
+ return $wppa_exif_error_output;
665
+ }
666
 
667
+ $temp = explode( '/', $data );
668
+ $x = $temp[0];
669
+ $y = $temp[1];
670
 
671
+ $result = ( $x / $y ) . ' ' . __( 'degrees', 'wp-photo-album-plus' );
 
 
 
 
672
  }
673
+ return $result;
674
 
675
  case 'E#0012': // CanonAFInfo
676
+ if ( $brand == 'CANON' ) {
677
+ if ( is_array( $data_arr ) && count( $data_arr ) >= 12 ) {
678
+ $result = '';
679
+ $result .= 'NumAFPoints:' . $data_arr[0] . ', ';
680
+ $result .= 'ValidAFPoints:' . $data_arr[1] . ', ';
681
+ $result .= 'CanonImageWidth:' . $data_arr[2] . ', ';
682
+ $result .= 'CanonImageHeight:' . $data_arr[3] . ', ';
683
+ $result .= 'AFImageWidth:' . $data_arr[4] . ', ';
684
+ $result .= 'AFImageHeight:' . $data_arr[5] . ', ';
685
+ $result .= 'AFAreaWidths:' . $data_arr[6] . ', ';
686
+ $result .= 'AFAreaHeights:' . $data_arr[7] . ', ';
687
+ $result .= 'AFAreaXPositions:' . $data_arr[8] . ', ';
688
+ $result .= 'AFAreaYPositions:' . $data_arr[9] . ', ';
689
+ $result .= 'AFPointsInFocus:' . $data_arr[10] . ', ';
690
+ $result .= 'PrimaryAFPoint:' . $data_arr[11] . ', ';
691
+ if ( isset( $data_arr[12] ) ) {
692
+ $result .= 'PrimaryAFPoint:' . $data_arr[12] . ', ';
693
+ }
694
+ $result = trim( $result, ', ' );
695
+ }
696
+ }
697
+ return $result;
698
+
699
  case 'E#0013': // ThumbnailImageValidArea
 
700
  return $result;
701
 
702
  case 'E#0015': // SerialNumberFormat
719
 
720
  case 'E#001A': // SuperMacro
721
  case 'E#001C': // DateStampMode
722
+ return $result;
723
+
724
  case 'E#001D': // MyColors
725
+ /*
726
+ 2 MyColorMode int16u
727
+ 0 = Off
728
+ 1 = Positive Film
729
+ 2 = Light Skin Tone
730
+ 3 = Dark Skin Tone
731
+ 4 = Vivid Blue
732
+ 5 = Vivid Green
733
+ 6 = Vivid Red
734
+ 7 = Color Accent
735
+ 8 = Color Swap
736
+ 9 = Custom
737
+ 12 = Vivid
738
+ 13 = Neutral
739
+ 14 = Sepia
740
+ 15 = B&W
741
+ */
742
  return $result;
743
 
744
  case 'E#001E': // FirmwareRevision (Canon) / ColorSpace (Nikon)
789
  $result = $data;
790
  return $result;
791
  }
792
+ return $result;
793
 
794
  case 'E#0023': // Categories
795
+ if ( $brand == 'CANON' ) {
796
+ if ( $data_arr[0] == 8 ) {
797
+ if ( $data_arr[1] == 0 ) {
798
+ $result = __( 'none', 'wp-photo-album-plus' );
799
+ }
800
+ else {
801
+ $result = '';
802
+ $b = $data_arr[1];
803
+ if ( $b & 0x01 ) $result .= 'People, ';
804
+ if ( $b & 0x02 ) $result .= 'Scenery, ';
805
+ if ( $b & 0x04 ) $result .= 'Events, ';
806
+ if ( $b & 0x08 ) $result .= 'User 1, ';
807
+ if ( $b & 0x10 ) $result .= 'User 2, ';
808
+ if ( $b & 0x20 ) $result .= 'User 3, ';
809
+ if ( $b & 0x40 ) $result .= 'To Do, ';
810
+ $result = trim( $result, ', ' );
811
+ }
812
+ }
813
+ }
814
+ return $result;
815
+
816
  case 'E#0024': // FaceDetect1
817
  case 'E#0025': // FaceDetect2
818
+ return $result;
819
+
820
  case 'E#0026': // CanonAFInfo2
821
+ case 'E#003C': // CanonAFInfo3
822
+ if ( $brand == 'CANON' ) {
823
+ if ( is_array( $data_arr ) && count( $data_arr ) >= 15 && $data_arr[1] >= 0 && $data_arr[1] <= 14 ) {
824
+ $result = 'AFAreaMode:';
825
+ switch( $data_arr[1] ) {
826
+ case 0: $result .= 'Off, '; break;
827
+ case 1: $result .= 'AF Point Expansion (surround), '; break;
828
+ case 2: $result .= 'Single-point AF, '; break;
829
+ case 4: $result .= 'Auto, '; break;
830
+ case 5: $result .= 'Face Detect AF, '; break;
831
+ case 6: $result .= 'Face + Tracking, '; break;
832
+ case 7: $result .= 'Zone AF, '; break;
833
+ case 8: $result .= 'AF Point Expansion (4 point), '; break;
834
+ case 9: $result .= 'Spot AF, '; break;
835
+ case 10: $result .= 'AF Point Expansion (8 point), '; break;
836
+ case 11: $result .= 'Flexizone Multi, '; break;
837
+ case 13: $result .= 'Flexizone Single, '; break;
838
+ case 14: $result .= 'Large Zone AF, '; break;
839
+ default: $result .= '?, ';
840
+ }
841
+ $result .= 'NumAFPoints:' . $data_arr[2] . ', ';
842
+ $result .= 'ValidAFPoints:' . $data_arr[3] . ', ';
843
+ $result .= 'CanonImageWidth:' . $data_arr[4] . ', ';
844
+ $result .= 'CanonImageHeight:' . $data_arr[5] . ', ';
845
+ $result .= 'AFImageWidth:' . $data_arr[6] . ', ';
846
+ $result .= 'AFImageHeight:' . $data_arr[7] . ', ';
847
+ $result .= 'AFAreaWidths:' . $data_arr[8] . ', ';
848
+ $result .= 'AFAreaHeights:' . $data_arr[9] . ', ';
849
+ $result .= 'AFAreaXPositions:' . $data_arr[10] . ', ';
850
+ $result .= 'AFAreaYPositions:' . $data_arr[11] . ', ';
851
+ $result .= 'AFPointsInFocus:' . $data_arr[12] . ', ';
852
+ $result .= 'AFPointsSelected:' . $data_arr[13] . ', ';
853
+ $result .= 'PrimaryAFPoint:' . $data_arr[14] . ', ';
854
+
855
+ $result = trim( $result, ', ' );
856
+ }
857
+ }
858
+ return $result;
859
+
860
  case 'E#0027': // ContrastInfo
861
+ /*
862
+ 4 IntelligentContrast int16u
863
+ 0x0 = Off
864
+ 0x8 = On
865
+ 0xffff = n/a
866
+ */
867
  case 'E#0028': // ImageUniqueID
868
  case 'E#002F': // FaceDetect3
869
+ return $result;
870
+
871
  case 'E#0035': // TimeInfo
872
+ if ( $brand == 'CANON' && is_array( $data_arr ) && count( $data_arr ) == 4 ) {
873
+ $result = 'Timezone:' . $data_arr[1] . ', ';
874
+ $result .= 'TimeZoneCity:';
875
+ switch ( $data_arr[2] ) {
876
+ case 0: $result .= 'n/a'; break;
877
+ case 1: $result .= 'Chatham Islands'; break;
878
+ case 2: $result .= 'Wellington'; break;
879
+ case 3: $result .= 'Solomon Islands'; break;
880
+ case 4: $result .= 'Sydney'; break;
881
+ case 5: $result .= 'Adelaide'; break;
882
+ case 6: $result .= 'Tokyo'; break;
883
+ case 7: $result .= 'Hong Kong'; break;
884
+ case 8: $result .= 'Bangkok'; break;
885
+ case 9: $result .= 'Yangon'; break;
886
+ case 10: $result .= 'Dhaka'; break;
887
+ case 11: $result .= 'Kathmandu'; break;
888
+ case 12: $result .= 'Delhi'; break;
889
+ case 13: $result .= 'Karachi'; break;
890
+ case 14: $result .= 'Kabul'; break;
891
+ case 15: $result .= 'Dubai'; break;
892
+ case 16: $result .= 'Tehran'; break;
893
+ case 17: $result .= 'Moscow'; break;
894
+ case 18: $result .= 'Cairo'; break;
895
+ case 19: $result .= 'Paris'; break;
896
+ case 20: $result .= 'London'; break;
897
+ case 21: $result .= 'Azores'; break;
898
+ case 22: $result .= 'Fernando de Noronha'; break;
899
+ case 23: $result .= 'Sao Paulo'; break;
900
+ case 24: $result .= 'Newfoundland'; break;
901
+ case 25: $result .= 'Santiago'; break;
902
+ case 26: $result .= 'Caracas'; break;
903
+ case 27: $result .= 'New York'; break;
904
+ case 28: $result .= 'Chicago'; break;
905
+ case 29: $result .= 'Denver'; break;
906
+ case 30: $result .= 'Los Angeles'; break;
907
+ case 31: $result .= 'Anchorage'; break;
908
+ case 32: $result .= 'Honolulu'; break;
909
+ case 33: $result .= 'Samoa'; break;
910
+ case 32766: $result .= '(not set)'; break;
911
+ default: $result .= '?';
912
+
913
+ }
914
+ $result .= ', DaylightSavings:';
915
+ if ( $data_arr[3] == 0 ) $result .= 'Off';
916
+ elseif( $data_arr[3] == 60 ) $result .= 'On';
917
+ else $result .= '?';
918
+ }
919
+ return $result;
920
+
921
+ // case 'E#003C': // AFInfo3 // See E#0026
922
+ // return $result;
923
+
924
  case 'E#0081': // RawDataOffset
925
  case 'E#0083': // OriginalDecisionDataOffset
926
  case 'E#0090': // CustomFunctions1D
933
  case 'E#0097': // DustRemovalData
934
  case 'E#0098': // CropInfo
935
  case 'E#0099': // CustomFunctions2
936
+ $result = $data;
937
+ return $result;
938
+
939
  case 'E#009A': // AspectInfo
940
+ $result = $data;
941
+ if ( $brand == 'CANON' ) {
942
+ if ( is_array( $data_arr ) && count( $data_arr ) == 5 ) {
943
+ $aspects = array(
944
+ 0 => '3:2',
945
+ 1 => '1:1',
946
+ 2 => '4:3',
947
+ 7 => '16:9',
948
+ 8 => '4:5',
949
+ );
950
+ $labels = array(
951
+ 0 => 'AspectRatio',
952
+ 1 => 'CroppedImageWidth',
953
+ 2 => 'CroppedImageHeight',
954
+ 3 => 'CroppedImageLeft',
955
+ 4 => 'CroppedImageTop',
956
+ );
957
+ if ( in_array( $data_arr[0], array_keys( $aspects ) ) ) {
958
+ $result = $labels[0] . ': ' . $aspects[$data_arr[0]] . ', ';
959
+ for ( $i=1; $i<5; $i++ ) {
960
+ $result .= $labels[$i] . ': ';
961
+ if ( $data_arr[$i] >= 0 ) {
962
+ $result .= $data_arr[$i] . ', ';
963
+ }
964
+ else {
965
+ $result .= '?, ';
966
+ }
967
+ }
968
+ }
969
+ else {
970
+ $result = $labels[0] . ': ?:?, ';
971
+ }
972
+ $result = trim( $result, ', ' );
973
+ }
974
+ }
975
+ return $result;
976
+
977
  case 'E#00A0': // ProcessingInfo
978
  case 'E#00A1': // ToneCurveTable
979
  case 'E#00A2': // SharpnessTable
1715
 
1716
  if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
1717
 
1718
+ $t = explode( '/', $data );
1719
+ if ( $t[1] == '1' ) {
1720
+ $result = $t[0];
1721
+ }
1722
+ else {
1723
+ $result = $data;
1724
+ }
1725
  return $result;
1726
  break;
1727
 
1728
  case 'E#9201': // Shutter speed value
1729
 
1730
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
 
 
1731
 
1732
  // Format is valid
1733
  $temp = explode( '/', $data );
1758
  case 'E#9204': // ExposureBiasValue
1759
 
1760
  // Invalid format?
1761
+ if ( ! wppa_is_valid_rational( $data ) ) {
1762
  return $wppa_exif_error_output;
1763
  }
1764
 
1790
  case 'E#9206': // Subject distance
1791
 
1792
  // Invalid format?
1793
+ if ( ! wppa_is_valid_rational( $data ) ) {
1794
  return $wppa_exif_error_output;
1795
  }
1796
 
2211
  return $result;
2212
  }
2213
 
2214
+ $result = $data;
2215
  return $result;
2216
  break;
2217
 
2601
  }
2602
  return $result;
2603
 
2604
+
2605
+ // FILE
2606
+ case 'F#0001': // FileName
2607
+ $result = $data;
2608
+ return $result;
2609
+
2610
+ case 'F#0002': // FileDateTime
2611
+ $result = wppa_local_date( '', $data );
2612
+ return $result;
2613
+
2614
+ case 'F#0003': // FileSize
2615
+ $result = $data . ' Bytes';
2616
+ return $result;
2617
+
2618
+ case 'F#0004': // FileType
2619
+
2620
+ if ( ! wppa_is_valid_integer( $data ) ) return $wppa_exif_error_output;
2621
+
2622
+ switch( $data ) {
2623
+ case 1: $result = 'gif'; break;
2624
+ case 2: $result = 'jpg'; break;
2625
+ case 3: $result = 'png'; break;
2626
+ default: $result = __( 'reserved', 'wp-photo-album-plus' );
2627
+ }
2628
+ return $result;
2629
+
2630
+ case 'F#0005': // MimeType
2631
+ case 'F#0006': // SectionsFound
2632
+ $result = $data;
2633
+ return $result;
2634
+
2635
+ // GPS
2636
+ case 'G#0000': // GPSVersionID int8u[4]
2637
+ $result = $data;
2638
+ return $result;
2639
+
2640
+ case 'G#0001': // GPSLatitudeRef string[2]
2641
+ switch( $data ) {
2642
+ case 'N': $result = __( 'North', 'wp-photo-album-plus' ); break;
2643
+ case 'S': $result = __( 'South', 'wp-photo-album-plus' ); break;
2644
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2645
+ }
2646
+ return $result;
2647
+
2648
+ case 'G#0002': // GPSLatitude rational64u[3]
2649
+ for( $i = 0; $i < 3; $i++ ) {
2650
+ if ( ! wppa_is_valid_rational( $data_arr[$i] ) ) return $wppa_exif_error_output;
2651
+ $data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
2652
+ }
2653
+ $result = $data_arr[0] . '&deg;' . $data_arr[1] . "'" . $data_arr[2] . '"';
2654
+ return $result;
2655
+
2656
+ case 'G#0003': // GPSLongitudeRef string[2]
2657
+ switch( $data ) {
2658
+ case 'E': $result = __( 'East', 'wp-photo-album-plus' ); break;
2659
+ case 'W': $result = __( 'West', 'wp-photo-album-plus' ); break;
2660
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2661
+ }
2662
+ return $result;
2663
+
2664
+ case 'G#0004': // GPSLongitude rational64u[3]
2665
+ for( $i = 0; $i < 3; $i++ ) {
2666
+ if ( ! wppa_is_valid_rational( $data_arr[$i] ) ) return $wppa_exif_error_output;
2667
+ $data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
2668
+ }
2669
+ $result = $data_arr[0] . '&deg;' . $data_arr[1] . "'" . $data_arr[2] . '"';
2670
+ return $result;
2671
+
2672
+ case 'G#0005': // GPSAltitudeRef int8u
2673
+ switch( $data ) {
2674
+ case 0: $result = __( 'Above Sea Level', 'wp-photo-album-plus' ); break;
2675
+ case 1: $result = __( 'Below Sea Level', 'wp-photo-album-plus' ); break;
2676
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2677
+ }
2678
+ return $result;
2679
+
2680
+ case 'G#0006': // GPSAltitude rational64u
2681
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2682
+ $result = wppa_simplify_rational( $data, true, 2 );
2683
+ return $result;
2684
+
2685
+ case 'G#0007': // GPSTimeStamp rational64u[3] UTC time of GPS fix.
2686
+ for( $i = 0; $i < 3; $i++ ) {
2687
+ if ( ! wppa_is_valid_rational( $data_arr[$i] ) ) return $wppa_exif_error_output;
2688
+ $data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
2689
+ }
2690
+ $result = $data_arr[0] . ':' . $data_arr[1] . ':' . $data_arr[2];
2691
+ return $result;
2692
+
2693
+ case 'G#0008': // GPSSatellites string
2694
+ $result = $data;
2695
+ return $result;
2696
+
2697
+ case 'G#0009': // GPSStatus string[2]
2698
+ switch( $data ) {
2699
+ case 'A': $result = __( 'Measurement Active', 'wp-photo-album-plus' ); break;
2700
+ case 'V': $result = __( 'Measurement Void', 'wp-photo-album-plus' ); break;
2701
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2702
+ }
2703
+ return $result;
2704
+
2705
+ case 'G#000A': // GPSMeasureMode string[2]
2706
+ switch( $data ) {
2707
+ case '2': $result = __( '2-Dimensional Measurement', 'wp-photo-album-plus' ); break;
2708
+ case '3': $result = __( '3-Dimensional Measurement', 'wp-photo-album-plus' ); break;
2709
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2710
+ }
2711
+ return $result;
2712
+
2713
+ case 'G#000B': // GPSDOP rational64u
2714
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2715
+ $result = wppa_simplify_rational( $data, true );
2716
+ return $result;
2717
+
2718
+ case 'G#000C': // GPSSpeedRef string[2]
2719
+ switch( $data ) {
2720
+ case 'K': $result = __( 'km/h', 'wp-photo-album-plus' ); break;
2721
+ case 'M': $result = __( 'mph', 'wp-photo-album-plus' ); break;
2722
+ case 'N': $result = __( 'knots', 'wp-photo-album-plus' ); break;
2723
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2724
+ }
2725
+ return $result;
2726
+
2727
+ case 'G#000D': // GPSSpeed rational64u
2728
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2729
+ $result = wppa_simplify_rational( $data, true );
2730
+ return $result;
2731
+
2732
+ case 'G#000E': // GPSTrackRef string[2]
2733
+ switch( $data ) {
2734
+ case 'M': $result = __( 'Magnetic North', 'wp-photo-album-plus' ); break;
2735
+ case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
2736
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2737
+ }
2738
+ return $result;
2739
+
2740
+ case 'G#000F': // GPSTrack rational64u
2741
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2742
+ $result = wppa_simplify_rational( $data, true );
2743
+ return $result;
2744
+
2745
+ case 'G#0010': // GPSImgDirectionRef string[2]
2746
+ switch( $data ) {
2747
+ case 'M': $result = __( 'Magnetic North', 'wp-photo-album-plus' ); break;
2748
+ case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
2749
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2750
+ }
2751
+ return $result;
2752
+
2753
+ case 'G#0011': // GPSImgDirection rational64u
2754
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2755
+ $result = wppa_simplify_rational( $data, true );
2756
+ return $result;
2757
+
2758
+ case 'G#0012': // GPSMapDatum string
2759
+ $result = $data;
2760
+ return $result;
2761
+
2762
+ case 'G#0013': // GPSDestLatitudeRef string[2]
2763
+ switch( $data ) {
2764
+ case 'N': $result = __( 'North', 'wp-photo-album-plus' ); break;
2765
+ case 'S': $result = __( 'South', 'wp-photo-album-plus' ); break;
2766
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2767
+ }
2768
+ return $result;
2769
+
2770
+ case 'G#0014': // GPSDestLatitude rational64u[3]
2771
+ for( $i = 0; $i < 3; $i++ ) {
2772
+ if ( ! wppa_is_valid_rational( $data_arr[$i] ) ) return $wppa_exif_error_output;
2773
+ $data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
2774
+ }
2775
+ $result = $data_arr[0] . '&deg;' . $data_arr[1] . "'" . $data_arr[2] . '"';
2776
+ return $result;
2777
+
2778
+ case 'G#0015': // GPSDestLongitudeRef string[2]
2779
+ switch( $data ) {
2780
+ case 'E': $result = __( 'East', 'wp-photo-album-plus' ); break;
2781
+ case 'W': $result = __( 'West', 'wp-photo-album-plus' ); break;
2782
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2783
+ }
2784
+ return $result;
2785
+
2786
+ case 'G#0016': // GPSDestLongitude rational64u[3]
2787
+ for( $i = 0; $i < 3; $i++ ) {
2788
+ if ( ! wppa_is_valid_rational( $data_arr[$i] ) ) return $wppa_exif_error_output;
2789
+ $data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
2790
+ }
2791
+ $result = $data_arr[0] . '&deg;' . $data_arr[1] . "'" . $data_arr[2] . '"';
2792
+ return $result;
2793
+
2794
+ case 'G#0017': // GPSDestBearingRef string[2]
2795
+ switch( $data ) {
2796
+ case 'M': $result = __( 'Magnetic North', 'wp-photo-album-plus' ); break;
2797
+ case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
2798
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2799
+ }
2800
+ return $result;
2801
+
2802
+ case 'G#0018': // GPSDestBearing rational64u
2803
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2804
+ $result = wppa_simplify_rational( $data, true );
2805
+ return $result;
2806
+
2807
+ case 'G#0019': // GPSDestDistanceRef string[2]
2808
+ switch( $data ) {
2809
+ case 'K': $result = __( 'Kilometers', 'wp-photo-album-plus' ); break;
2810
+ case 'M': $result = __( 'Miles', 'wp-photo-album-plus' ); break;
2811
+ case 'N': $result = __( 'Nautical Miles', 'wp-photo-album-plus' ); break;
2812
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2813
+ }
2814
+ return $result;
2815
+
2816
+ case 'G#001A': // GPSDestDistance rational64u
2817
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2818
+ $result = wppa_simplify_rational( $data, true );
2819
+ return $result;
2820
+
2821
+ case 'G#001B': // GPSProcessingMethod undef
2822
+ case 'G#001C': // GPSAreaInformation undef
2823
+ case 'G#001D': // GPSDateStamp string[11]
2824
+ $result = $data;
2825
+ return $result;
2826
+
2827
+ case 'G#001E': // GPSDifferential int16u
2828
+ switch( $data ) {
2829
+ case 0: $result = __( 'No Correction', 'wp-photo-album-plus' ); break;
2830
+ case 1: $result = __( 'Differential Corrected', 'wp-photo-album-plus' ); break;
2831
+ default: $result = __( 'Undefined', 'wp-photo-album-plus' );
2832
+ }
2833
+ return $result;
2834
+
2835
+ case 'G#001F': // GPSHPositioningError rational64u
2836
+ if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
2837
+ $result = wppa_simplify_rational( $data, true );
2838
+ return $result;
2839
+
2840
+
2841
  // Unformatted
2842
  default:
2843
  $result = $data;
2853
  return $result;
2854
  }
2855
 
2856
+ function wppa_is_valid_rational( $data, $complain = true ) {
2857
  global $wppa_exif_error_output;
2858
 
2859
  // Must contain a '/'
2860
  if ( strpos( $data, '/' ) == false ) {
2861
+ if ( $complain ) $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Missing /', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2862
  return false;
2863
  }
2864
 
2865
  // make array
2866
  $t = explode( '/', $data );
2867
 
2868
+ // Numeric?
2869
+ if ( ! is_numeric( $t[0] ) || ! is_numeric ( $t[1] ) ) {
2870
+ if ( $complain ) $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Not rational', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2871
  return false;
2872
  }
2873
 
2874
+ // Divide by zero?
2875
+ if ( $t[1] == 0 ) {
2876
+ if ( $complain ) $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Divide by zero', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2877
  return false;
2878
  }
2879
 
2884
 
2885
  // Unlikely value?
2886
  if ( $t[0] / $t[1] > 100000 || abs( $t[0] / $t[1] ) < 0.00001 ) {
2887
+ if ( $complain ) $wppa_exif_error_output = '<span title="' . esc_attr( __( 'Unlikely value', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
2888
  return false;
2889
  }
2890
 
2892
  return true;
2893
  }
2894
 
2895
+ function wppa_simplify_rational( $data, $divide = false, $dec = 0 ) {
2896
 
2897
  // make array
2898
  $t = explode( '/', $data );
2899
  $x = $t[0];
2900
  $y = $t[1];
2901
 
2902
+ // Divide result?
2903
+ if ( $divide ) {
2904
+ $result = $x / $y;
2905
+ if ( $dec ) {
2906
+ $result = sprintf( '%4.' . $dec . 'f', $result );
2907
+ }
2908
+ return $result;
2909
+ }
2910
+
2911
  // Is already simplified to the max?
2912
  if ( $x == 1 ) {
2913
  $result = $data;
2916
 
2917
  // Result is zero?
2918
  if ( $x == 0 ) {
2919
+ $result = $data;
2920
  return $result;
2921
  }
2922
 
2926
  return $result;
2927
  }
2928
 
2929
+ // Continue simplifying
2930
+ $prime = array(2,3,5,7,11,13,17,19,23,29,31);
2931
  foreach( $prime as $p ) {
2932
  while ( wppa_is_divisible( $x, $p ) && wppa_is_divisible( $y, $p ) ) {
2933
  $x = $x / $p;
2936
  }
2937
  $result = $x . '/' . $y;
2938
 
 
2939
  return $result;
2940
  }
2941
 
3012
  foreach( $exifs as $exif ) {
3013
 
3014
  $f_description = strip_tags( wppa_format_exif( $exif['tag'], $exif['description'], $brand ) );
3015
+ $tagbrand = trim( wppa_exif_tagname( $exif['tag'], $brand, 'brandonly' ), ': ' ) ? $brand : '';
3016
 
3017
  // If f_description or thabrand changed: update
3018
  if ( $f_description != $exif['f_description'] || $tagbrand != $exif['brand'] ) {
3202
 
3203
  // Get exif data
3204
  if ( ! function_exists( 'exif_read_data' ) ) return false; // Not supported by the server
3205
+ $exif = @ exif_read_data( $file, 'ANY_TAG' );
3206
  if ( ! is_array( $exif ) ) return false; // No data present
3207
 
3208
  // There is exif data for this image.
3255
  $status = 'display';
3256
  if ( substr( $s, 0, 12 ) == 'UndefinedTag' ) {
3257
  $status = 'option';
3258
+ $desc = wppa_exif_tagname( $tag );
3259
  if ( substr( $desc, 0, 12 ) != 'UndefinedTag' ) {
3260
  $status = 'display';
3261
  }
3266
 
3267
  // Now add poto specific data item
3268
  // If its an array...
3269
+ if ( is_array( $exif[$s] ) ) {
3270
+
3271
+
3272
+ /*
3273
 
3274
  $c = count ( $exif[$s] );
3275
  $max = wppa_opt( 'exif_max_array_size' );
3285
  if ( ! $bret ) wppa_log( 'War', 'Could not add EXIF tag '.$tag.' for photo '.$photo );
3286
 
3287
  }
3288
+ */
3289
+ /*
3290
+ $max = wppa_opt( 'exif_max_array_size' );
3291
+ if ( $max != 0 && count( $exif[$s] ) > $max ) {
3292
+ $temp = array_slice( $exif[$s], 0, $max, true );
3293
+ }
3294
+ else {
3295
+ $temp = $exif[$s];
3296
+ }
3297
+ */
3298
+ $desc = serialize( $exif[$s] );
3299
+ // wppa_dump( $id . ':' . $tag );
3300
+ // wppa_dump( var_export( $temp, true ) );
3301
  }
3302
  // Its not an array
3303
  else {
3304
 
 
3305
  $desc = $exif[$s];
3306
+
 
 
3307
  }
3308
+
3309
+ $photo = $id;
3310
+ $status = 'default';
3311
+ $bret = wppa_create_exif_entry( array( 'photo' => $photo, 'tag' => $tag, 'description' => $desc, 'status' => $status ) );
3312
+ if ( ! $bret ) {} /* wppa_log( 'Warning 3', 'Could not add EXIF tag '.$tag.' for photo '.$photo.', desc = '.$desc ); */ // Is junk, dont care
3313
+
3314
  }
3315
 
3316
  wppa_fix_exif_format( $id );
3319
  // Convert exif tagname as found by exif_read_data() to E#XXXX, Inverse of exif_tagname();
3320
  function wppa_exif_tag( $tagname ) {
3321
  static $wppa_inv_exiftags;
3322
+ static $wppa_inv_gpstags;
3323
+ static $wppa_inv_filetags;
3324
 
3325
+ // Setup inverted matrix standard tags
3326
  if ( ! is_array( $wppa_inv_exiftags ) ) {
3327
  $key = 0;
3328
  while ( $key < 65536 ) {
3335
  }
3336
  }
3337
 
3338
+ // Setup inverted matrix filetags
3339
+ if ( ! is_array( $wppa_inv_filetags ) ) {
3340
+ $wppa_inv_filetags = array(
3341
+ 'FileName' => 0x0001,
3342
+ 'FileDateTime' => 0x0002,
3343
+ 'FileSize' => 0x0003,
3344
+ 'FileType' => 0x0004,
3345
+ 'MimeType' => 0x0005,
3346
+ 'SectionsFound' => 0x0006,
3347
+ );
3348
+ }
3349
+
3350
+ // Setup inverted matrix GPS tags
3351
+ if ( ! is_array( $wppa_inv_gpstags ) ) {
3352
+ $wppa_inv_gpstags = array(
3353
+ 'GPSVersionID' => 0x0000, // int8u[4]
3354
+ 'GPSLatitudeRef' => 0x0001, // string[2] 'N' = North 'S' = South
3355
+ 'GPSLatitude' => 0x0002, // rational64u[3]
3356
+ 'GPSLongitudeRef' => 0x0003, // string[2] 'E' = East 'W' = West
3357
+ 'GPSLongitude' => 0x0004, // rational64u[3]
3358
+ 'GPSAltitudeRef' => 0x0005, // int8u 0 = Above Sea Level 1 = Below Sea Level
3359
+ 'GPSAltitude' => 0x0006, // rational64u
3360
+ 'GPSTimeStamp' => 0x0007, // rational64u[3]
3361
+ 'GPSSatellites' => 0x0008, // string
3362
+ 'GPSStatus' => 0x0009, // string[2] 'A' = Measurement Active 'V' = Measurement Void
3363
+ 'GPSMeasureMode' => 0x000a, // string[2] 2 = 2-Dimensional Measurement 3 = 3-Dimensional Measurement
3364
+ 'GPSDOP' => 0x000b, // rational64u
3365
+ 'GPSSpeedRef' => 0x000c, // string[2] 'K' = km/h 'M' = mph 'N' = knots
3366
+ 'GPSSpeed' => 0x000d, // rational64u
3367
+ 'GPSTrackRef' => 0x000e, // string[2] 'M' = Magnetic North 'T' = True North
3368
+ 'GPSTrack' => 0x000f, // rational64u
3369
+ 'GPSImgDirectionRef' => 0x0010, // string[2] 'M' = Magnetic North 'T' = True North
3370
+ 'GPSImgDirection' => 0x0011, // rational64u
3371
+ 'GPSMapDatum' => 0x0012, // string
3372
+ 'GPSDestLatitudeRef' => 0x0013, // string[2] 'N' = North 'S' = South
3373
+ 'GPSDestLatitude' => 0x0014, // rational64u[3]
3374
+ 'GPSDestLongitudeRef' => 0x0015, // string[2] 'E' = East 'W' = West
3375
+ 'GPSDestLongitude' => 0x0016, // rational64u[3]
3376
+ 'GPSDestBearingRef' => 0x0017, // string[2] 'M' = Magnetic North 'T' = True North
3377
+ 'GPSDestBearing' => 0x0018, // rational64u
3378
+ 'GPSDestDistanceRef' => 0x0019, // string[2] 'K' = Kilometers 'M' = Miles 'N' = Nautical Miles
3379
+ 'GPSDestDistance' => 0x001a, // rational64u
3380
+ 'GPSProcessingMethod' => 0x001b, // undef (values of "GPS", "CELLID", "WLAN" or "MANUAL" by the EXIF spec.)
3381
+ 'GPSAreaInformation' => 0x001c, // undef
3382
+ 'GPSDateStamp' => 0x001d, // string[11] (Format is YYYY:mm:dd)
3383
+ 'GPSDifferential' => 0x001e, // int16u 0 = No Correction 1 = Differential Corrected
3384
+ 'GPSHPositioningError' => 0x001f, // rational64u
3385
+ );
3386
+ }
3387
+
3388
  // Search
3389
+ if ( isset( $wppa_inv_exiftags[$tagname] ) ) {
3390
+ return sprintf( 'E#%04X', $wppa_inv_exiftags[$tagname] );
3391
+ }
3392
+ elseif ( isset( $wppa_inv_filetags[$tagname] ) ) {
3393
+ return sprintf( 'F#%04X', $wppa_inv_filetags[$tagname] );
3394
+ }
3395
+ elseif ( isset( $wppa_inv_gpstags[$tagname] ) ) {
3396
+ return sprintf( 'G#%04X', $wppa_inv_gpstags[$tagname] );
3397
+ }
3398
  elseif ( strlen( $tagname ) == 19 ) {
3399
  if ( substr( $tagname, 0, 12 ) == 'UndefinedTag' ) return 'E#'.substr( $tagname, -4 );
3400
  }
3401
  else return '';
3402
  }
3403
 
3404
+ // Wrapper around exif_tagname(), convert E#XXXX, F# XXXX or G#XXXX to TagName
3405
  function wppa_exif_tagname( $tag, $brand = '', $brandonly = false ) {
3406
  global $wpdb;
3407
  static $canontags;
3409
  static $samsungtags;
3410
  static $editabletags;
3411
  static $commontags;
3412
+ static $gpstags;
3413
+ static $filetags;
3414
 
3415
+ if ( strlen($tag) != 6 ) {
3416
+ wppa_log('Err', 'wppa_exif_tagname() called with tag = '.$tag, true);
3417
+ }
3418
  // Fill $canontags if not done yet
3419
  if ( empty( $canontags ) ) {
3420
  $canontags = array(
3421
+ 'E#0001' => 'CanonCameraSettings',
3422
+ 'E#0002' => 'CanonFocalLength',
3423
+ 'E#0003' => 'CanonFlashInfo?',
3424
+ 'E#0004' => 'CanonShotInfo',
3425
+ 'E#0005' => 'CanonPanorama',
3426
+ 'E#0006' => 'CanonImageType',
3427
+ 'E#0007' => 'CanonFirmwareVersion',
3428
+ 'E#0008' => 'FileNumber',
3429
+ 'E#0009' => 'OwnerName',
3430
+ 'E#000A' => 'UnknownD30',
3431
+ 'E#000C' => 'SerialNumber',
3432
+ 'E#000D' => 'CanonCameraInfo',
3433
+ 'E#000E' => 'CanonFileLength',
3434
+ 'E#000F' => 'CustomFunctions',
3435
+ 'E#0010' => 'CanonModelID',
3436
+ 'E#0011' => 'MovieInfo',
3437
+ 'E#0012' => 'CanonAFInfo',
3438
+ 'E#0013' => 'ThumbnailImageValidArea',
3439
+ 'E#0015' => 'SerialNumberFormat',
3440
+ 'E#001A' => 'SuperMacro',
3441
+ 'E#001C' => 'DateStampMode',
3442
+ 'E#001D' => 'MyColors',
3443
+ 'E#001E' => 'FirmwareRevision',
3444
+ 'E#0023' => 'Categories',
3445
+ 'E#0024' => 'FaceDetect1',
3446
+ 'E#0025' => 'FaceDetect2',
3447
+ 'E#0026' => 'CanonAFInfo2',
3448
+ 'E#0027' => 'ContrastInfo',
3449
+ 'E#0028' => 'ImageUniqueID',
3450
+ 'E#002F' => 'FaceDetect3',
3451
+ 'E#0035' => 'TimeInfo',
3452
+ 'E#003C' => 'AFInfo3',
3453
+ 'E#0081' => 'RawDataOffset',
3454
+ 'E#0083' => 'OriginalDecisionDataOffset',
3455
+ 'E#0090' => 'CustomFunctions1D',
3456
+ 'E#0091' => 'PersonalFunctions',
3457
+ 'E#0092' => 'PersonalFunctionValues',
3458
+ 'E#0093' => 'CanonFileInfo',
3459
+ 'E#0094' => 'AFPointsInFocus1D',
3460
+ 'E#0095' => 'LensModel',
3461
+ 'E#0096' => 'SerialInfo',
3462
+ 'E#0097' => 'DustRemovalData',
3463
+ 'E#0098' => 'CropInfo',
3464
+ 'E#0099' => 'CustomFunctions2',
3465
+ 'E#009A' => 'AspectInfo',
3466
+ 'E#00A0' => 'ProcessingInfo',
3467
+ 'E#00A1' => 'ToneCurveTable',
3468
+ 'E#00A2' => 'SharpnessTable',
3469
+ 'E#00A3' => 'SharpnessFreqTable',
3470
+ 'E#00A4' => 'WhiteBalanceTable',
3471
+ 'E#00A9' => 'ColorBalance',
3472
+ 'E#00AA' => 'MeasuredColor',
3473
+ 'E#00AE' => 'ColorTemperature',
3474
+ 'E#00B0' => 'CanonFlags',
3475
+ 'E#00B1' => 'ModifiedInfo',
3476
+ 'E#00B2' => 'ToneCurveMatching',
3477
+ 'E#00B3' => 'WhiteBalanceMatching',
3478
+ 'E#00B4' => 'ColorSpace',
3479
+ 'E#00B6' => 'PreviewImageInfo',
3480
+ 'E#00D0' => 'VRDOffset',
3481
+ 'E#00E0' => 'SensorInfo',
3482
+ 'E#4001' => 'ColorData',
3483
+ 'E#4002' => 'CRWParam?',
3484
+ 'E#4003' => 'ColorInfo',
3485
+ 'E#4005' => 'Flavor?',
3486
+ 'E#4008' => 'PictureStyleUserDef',
3487
+ 'E#4009' => 'PictureStylePC',
3488
+ 'E#4010' => 'CustomPictureStyleFileName',
3489
+ 'E#4013' => 'AFMicroAdj',
3490
+ 'E#4015' => 'VignettingCorr',
3491
+ 'E#4016' => 'VignettingCorr2',
3492
+ 'E#4018' => 'LightingOpt',
3493
+ 'E#4019' => 'LensInfo',
3494
+ 'E#4020' => 'AmbienceInfo',
3495
+ 'E#4021' => 'MultiExp',
3496
+ 'E#4024' => 'FilterInfo',
3497
+ 'E#4025' => 'HDRInfo',
3498
+ 'E#4028' => 'AFConfig',
3499
  );
3500
  }
3501
 
3502
  // Fill $nikontags if not done yet
3503
  if ( empty( $nikontags ) ) {
3504
  $nikontags = array(
3505
+ 'E#0001' => 'MakerNoteVersion',
3506
+ 'E#0002' => 'ISO',
3507
+ 'E#0003' => 'ColorMode',
3508
+ 'E#0004' => 'Quality',
3509
+ 'E#0005' => 'WhiteBalance',
3510
+ 'E#0006' => 'Sharpness',
3511
+ 'E#0007' => 'FocusMode',
3512
+ 'E#0008' => 'FlashSetting',
3513
+ 'E#0009' => 'FlashType',
3514
+ 'E#000B' => 'WhiteBalanceFineTune',
3515
+ 'E#000C' => 'WB_RBLevels',
3516
+ 'E#000D' => 'ProgramShift',
3517
+ 'E#000E' => 'ExposureDifference',
3518
+ 'E#000F' => 'ISOSelection',
3519
+ 'E#0010' => 'DataDump',
3520
+ 'E#0011' => 'PreviewIFD',
3521
+ 'E#0012' => 'FlashExposureComp',
3522
+ 'E#0013' => 'ISOSetting',
3523
+ 'E#0014' => 'ColorBalanceA',
3524
+ 'E#0016' => 'ImageBoundary',
3525
+ 'E#0017' => 'ExternalFlashExposureComp',
3526
+ 'E#0018' => 'FlashExposureBracketValue',
3527
+ 'E#0019' => 'ExposureBracketValue',
3528
+ 'E#001A' => 'ImageProcessing',
3529
+ 'E#001B' => 'CropHiSpeed',
3530
+ 'E#001C' => 'ExposureTuning',
3531
+ 'E#001D' => 'SerialNumber',
3532
+ 'E#001E' => 'ColorSpace',
3533
+ 'E#001F' => 'VRInfo',
3534
+ 'E#0020' => 'ImageAuthentication',
3535
+ 'E#0021' => 'FaceDetect',
3536
+ 'E#0022' => 'ActiveD-Lighting',
3537
+ 'E#0023' => 'PictureControlData',
3538
+ 'E#0024' => 'WorldTime',
3539
+ 'E#0025' => 'ISOInfo',
3540
+ 'E#002A' => 'VignetteControl',
3541
+ 'E#002B' => 'DistortInfo',
3542
+ 'E#002C' => 'UnknownInfo',
3543
+ 'E#0032' => 'UnknownInfo2',
3544
+ 'E#0035' => 'HDRInfo',
3545
+ 'E#0039' => 'LocationInfo',
3546
+ 'E#003D' => 'BlackLevel',
3547
+ 'E#004F' => 'ColorTemperatureAuto',
3548
+ 'E#0080' => 'ImageAdjustment',
3549
+ 'E#0081' => 'ToneComp',
3550
+ 'E#0082' => 'AuxiliaryLens',
3551
+ 'E#0083' => 'LensType',
3552
+ 'E#0084' => 'Lens',
3553
+ 'E#0085' => 'ManualFocusDistance',
3554
+ 'E#0086' => 'DigitalZoom',
3555
+ 'E#0087' => 'FlashMode',
3556
+ 'E#0088' => 'AFInfo',
3557
+ 'E#0089' => 'ShootingMode',
3558
+ 'E#008B' => 'LensFStops',
3559
+ 'E#008C' => 'ContrastCurve',
3560
+ 'E#008D' => 'ColorHue',
3561
+ 'E#008F' => 'SceneMode',
3562
+ 'E#0090' => 'LightSource',
3563
+ 'E#0091' => 'ShotInfo',
3564
+ 'E#0092' => 'HueAdjustment',
3565
+ 'E#0093' => 'NEFCompression',
3566
+ 'E#0094' => 'Saturation',
3567
+ 'E#0095' => 'NoiseReduction',
3568
+ 'E#0096' => 'NEFLinearizationTable',
3569
+ 'E#0097' => 'ColorBalance',
3570
+ 'E#0099' => 'RawImageCenter',
3571
+ 'E#009A' => 'SensorPixelSize',
3572
+ 'E#009C' => 'SceneAssist',
3573
+ 'E#009E' => 'RetouchHistory',
3574
+ 'E#00A0' => 'SerialNumber',
3575
+ 'E#00A2' => 'ImageDataSize',
3576
+ 'E#00A5' => 'ImageCount',
3577
+ 'E#00A6' => 'DeletedImageCount',
3578
+ 'E#00A7' => 'ShutterCount',
3579
+ 'E#00A8' => 'FlashInfo',
3580
+ 'E#00A9' => 'ImageOptimization',
3581
+ 'E#00AA' => 'Saturation',
3582
+ 'E#00AB' => 'VariProgram',
3583
+ 'E#00AC' => 'ImageStabilization',
3584
+ 'E#00AD' => 'AFResponse',
3585
+ 'E#00B0' => 'MultiExposure',
3586
+ 'E#00B1' => 'HighISONoiseReduction',
3587
+ 'E#00B3' => 'ToningEffect',
3588
+ 'E#00B6' => 'PowerUpTime',
3589
+ 'E#00B7' => 'AFInfo2',
3590
+ 'E#00B8' => 'FileInfo',
3591
+ 'E#00B9' => 'AFTune',
3592
+ 'E#00BB' => 'RetouchInfo',
3593
+ 'E#00BD' => 'PictureControlData',
3594
+ 'E#00C3' => 'BarometerInfo',
3595
+ 'E#0E00' => 'PrintIM',
3596
+ 'E#0E01' => 'NikonCaptureData',
3597
+ 'E#0E09' => 'NikonCaptureVersion',
3598
+ 'E#0E0E' => 'NikonCaptureOffsets',
3599
+ 'E#0E10' => 'NikonScanIFD',
3600
+ 'E#0E13' => 'NikonCaptureEditVersions',
3601
+ 'E#0E1D' => 'NikonICCProfile',
3602
+ 'E#0E1E' => 'NikonCaptureOutput',
3603
+ 'E#0E22' => 'NEFBitDepth',
3604
 
3605
  );
3606
  }
3608
  // Fill $samsungtags
3609
  if ( empty( $samsungtags ) ) {
3610
  $samsungtags = array(
3611
+ 'E#0001' => 'MakerNoteVersion',
3612
+ 'E#0002' => 'DeviceType',
3613
+ 'E#0003' => 'SamsungModelID',
3614
+ 'E#0011' => 'OrientationInfo',
3615
+ 'E#0020' => 'SmartAlbumColor',
3616
+ 'E#0021' => 'PictureWizard',
3617
+ 'E#0030' => 'LocalLocationName',
3618
+ 'E#0031' => 'LocationName',
3619
+ 'E#0035' => 'PreviewIFD',
3620
+ 'E#0040' => 'RawDataByteOrder',
3621
+ 'E#0041' => 'WhiteBalanceSetup',
3622
+ 'E#0043' => 'CameraTemperature',
3623
+ 'E#0050' => 'RawDataCFAPattern',
3624
+ 'E#0100' => 'FaceDetect',
3625
+ 'E#0120' => 'FaceRecognition',
3626
+ 'E#0123' => 'FaceName',
3627
+ 'E#A001' => 'FirmwareName',
3628
+ 'E#A003' => 'LensType',
3629
+ 'E#A004' => 'LensFirmware',
3630
+ 'E#A005' => 'InternalLensSerialNumber',
3631
+ 'E#A010' => 'SensorAreas',
3632
+ 'E#A011' => 'ColorSpace',
3633
+ 'E#A012' => 'SmartRange',
3634
+ 'E#A013' => 'ExposureCompensation',
3635
+ 'E#A014' => 'ISO',
3636
+ 'E#A018' => 'ExposureTime',
3637
+ 'E#A019' => 'FNumber',
3638
+ 'E#A01A' => 'FocalLengthIn35mmFormat',
3639
+ 'E#A020' => 'EncryptionKey',
3640
+ 'E#A021' => 'WB_RGGBLevelsUncorrected',
3641
+ 'E#A022' => 'WB_RGGBLevelsAuto',
3642
+ 'E#A023' => 'WB_RGGBLevelsIlluminator1',
3643
+ 'E#A024' => 'WB_RGGBLevelsIlluminator2',
3644
+ 'E#A025' => 'HighlightLinearityLimit',
3645
+ 'E#A028' => 'WB_RGGBLevelsBlack',
3646
+ 'E#A030' => 'ColorMatrix',
3647
+ 'E#A031' => 'ColorMatrixSRGB',
3648
+ 'E#A032' => 'ColorMatrixAdobeRGB',
3649
+ 'E#A033' => 'CbCrMatrixDefault',
3650
+ 'E#A034' => 'CbCrMatrix',
3651
+ 'E#A035' => 'CbCrGainDefault',
3652
+ 'E#A036' => 'CbCrGain',
3653
+ 'E#A040' => 'ToneCurveSRGBDefault',
3654
+ 'E#A041' => 'ToneCurveAdobeRGBDefault',
3655
+ 'E#A042' => 'ToneCurveSRGB',
3656
+ 'E#A043' => 'ToneCurveAdobeRGB',
3657
+ 'E#A048' => 'RawData?',
3658
+ 'E#A050' => 'Distortion?',
3659
+ 'E#A051' => 'ChromaticAberration?',
3660
+ 'E#A052' => 'Vignetting?',
3661
+ 'E#A053' => 'VignettingCorrection?',
3662
+ 'E#A054' => 'VignettingSetting?',
3663
 
3664
  );
3665
  }
3675
 
3676
  if ( empty( $commontags ) ) {
3677
  $commontags = array(
3678
+ 'E#0001' => 'InteropIndex',
3679
+ 'E#0002' => 'InteropVersion',
3680
+ 'E#000B' => 'ProcessingSoftware',
3681
+ 'E#00FE' => 'SubfileType',
3682
+ 'E#00FF' => 'OldSubfileType',
3683
+ 'E#0100' => 'ImageWidth',
3684
+ 'E#0101' => 'ImageHeight',
3685
+ 'E#0102' => 'BitsPerSample',
3686
+ 'E#0103' => 'Compression',
3687
+ 'E#0106' => 'PhotometricInterpretation',
3688
+ 'E#0107' => 'Thresholding',
3689
+ 'E#0108' => 'CellWidth',
3690
+ 'E#0109' => 'CellLength',
3691
+ 'E#010A' => 'FillOrder',
3692
+ 'E#010D' => 'DocumentName',
3693
+ 'E#010E' => 'ImageDescription',
3694
+ 'E#010F' => 'Make',
3695
+ 'E#0110' => 'Model',
3696
+ 'E#0111' => 'StripOffsets',
3697
+ 'E#0112' => 'Orientation',
3698
+ 'E#0115' => 'SamplesPerPixel',
3699
+ 'E#0116' => 'RowsPerStrip',
3700
+ 'E#0117' => 'StripByteCounts',
3701
+ 'E#0118' => 'MinSampleValue',
3702
+ 'E#0119' => 'MaxSampleValue',
3703
+ 'E#011A' => 'XResolution',
3704
+ 'E#011B' => 'YResolution',
3705
+ 'E#011C' => 'PlanarConfiguration',
3706
+ 'E#011D' => 'PageName',
3707
+ 'E#011E' => 'XPosition',
3708
+ 'E#011F' => 'YPosition',
3709
+ 'E#0120' => 'FreeOffsets',
3710
+ 'E#0121' => 'FreeByteCounts',
3711
+ 'E#0122' => 'GrayResponseUnit',
3712
+ 'E#0123' => 'GrayResponseCurve',
3713
+ 'E#0124' => 'T4Options',
3714
+ 'E#0125' => 'T6Options',
3715
+ 'E#0128' => 'ResolutionUnit',
3716
+ 'E#0129' => 'PageNumber',
3717
+ 'E#012C' => 'ColorResponseUnit',
3718
+ 'E#012D' => 'TransferFunction',
3719
+ 'E#0131' => 'Software',
3720
+ 'E#0132' => 'ModifyDate',
3721
+ 'E#013B' => 'Artist',
3722
+ 'E#013C' => 'HostComputer',
3723
+ 'E#013D' => 'Predictor',
3724
+ 'E#013E' => 'WhitePoint',
3725
+ 'E#013F' => 'PrimaryChromaticities',
3726
+ 'E#0140' => 'ColorMap',
3727
+ 'E#0141' => 'HalftoneHints',
3728
+ 'E#0142' => 'TileWidth',
3729
+ 'E#0143' => 'TileLength',
3730
+ 'E#0144' => 'TileOffsets',
3731
+ 'E#0145' => 'TileByteCounts',
3732
+ 'E#0146' => 'BadFaxLines',
3733
+ 'E#0147' => 'CleanFaxData',
3734
+ 'E#0148' => 'ConsecutiveBadFaxLines',
3735
+ 'E#014A' => 'SubIFD',
3736
+ 'E#014C' => 'InkSet',
3737
+ 'E#014D' => 'InkNames',
3738
+ 'E#014E' => 'NumberofInks',
3739
+ 'E#0150' => 'DotRange',
3740
+ 'E#0151' => 'TargetPrinter',
3741
+ 'E#0152' => 'ExtraSamples',
3742
+ 'E#0153' => 'SampleFormat',
3743
+ 'E#0154' => 'SMinSampleValue',
3744
+ 'E#0155' => 'SMaxSampleValue',
3745
+ 'E#0156' => 'TransferRange',
3746
+ 'E#0157' => 'ClipPath',
3747
+ 'E#0158' => 'XClipPathUnits',
3748
+ 'E#0159' => 'YClipPathUnits',
3749
+ 'E#015A' => 'Indexed',
3750
+ 'E#015B' => 'JPEGTables',
3751
+ 'E#015F' => 'OPIProxy',
3752
+ 'E#0190' => 'GlobalParametersIFD',
3753
+ 'E#0191' => 'ProfileType',
3754
+ 'E#0192' => 'FaxProfile',
3755
+ 'E#0193' => 'CodingMethods',
3756
+ 'E#0194' => 'VersionYear',
3757
+ 'E#0195' => 'ModeNumber',
3758
+ 'E#01B1' => 'Decode',
3759
+ 'E#01B2' => 'DefaultImageColor',
3760
+ 'E#01B3' => 'T82Options',
3761
+ 'E#01B5' => 'JPEGTables',
3762
+ 'E#0200' => 'JPEGProc',
3763
+ 'E#0201' => 'ThumbnailOffset',
3764
+ 'E#0202' => 'ThumbnailLength',
3765
+ 'E#0203' => 'JPEGRestartInterval',
3766
+ 'E#0205' => 'JPEGLosslessPredictors',
3767
+ 'E#0206' => 'JPEGPointTransforms',
3768
+ 'E#0207' => 'JPEGQTables',
3769
+ 'E#0208' => 'JPEGDCTables',
3770
+ 'E#0209' => 'JPEGACTables',
3771
+ 'E#0211' => 'YCbCrCoefficients',
3772
+ 'E#0212' => 'YCbCrSubSampling',
3773
+ 'E#0213' => 'YCbCrPositioning',
3774
+ 'E#0214' => 'ReferenceBlackWhite',
3775
+ 'E#022F' => 'StripRowCounts',
3776
+ 'E#02BC' => 'ApplicationNotes',
3777
+ 'E#03E7' => 'USPTOMiscellaneous',
3778
+ 'E#1000' => 'RelatedImageFileFormat',
3779
+ 'E#1001' => 'RelatedImageWidth',
3780
+ 'E#1002' => 'RelatedImageHeight',
3781
+ 'E#4746' => 'Rating',
3782
+ 'E#4747' => 'XP_DIP_XML',
3783
+ 'E#4748' => 'StitchInfo',
3784
+ 'E#4749' => 'RatingPercent',
3785
+ 'E#7000' => 'SonyRawFileType',
3786
+ 'E#7032' => 'VignettingCorrParams',
3787
+ 'E#7035' => 'ChromaticAberrationCorrParams',
3788
+ 'E#7037' => 'DistortionCorrParams',
3789
+ 'E#800D' => 'ImageID',
3790
+ 'E#80A3' => 'WangTag1',
3791
+ 'E#80A4' => 'WangAnnotation',
3792
+ 'E#80A5' => 'WangTag3',
3793
+ 'E#80A6' => 'WangTag4',
3794
+ 'E#80B9' => 'ImageReferencePoints',
3795
+ 'E#80BA' => 'RegionXformTackPoint',
3796
+ 'E#80BB' => 'WarpQuadrilateral',
3797
+ 'E#80BC' => 'AffineTransformMat',
3798
+ 'E#80E3' => 'Matteing',
3799
+ 'E#80E4' => 'DataType',
3800
+ 'E#80E5' => 'ImageDepth',
3801
+ 'E#80E6' => 'TileDepth',
3802
+ 'E#8214' => 'ImageFullWidth',
3803
+ 'E#8215' => 'ImageFullHeight',
3804
+ 'E#8216' => 'TextureFormat',
3805
+ 'E#8217' => 'WrapModes',
3806
+ 'E#8218' => 'FovCot',
3807
+ 'E#8219' => 'MatrixWorldToScreen',
3808
+ 'E#821A' => 'MatrixWorldToCamera',
3809
+ 'E#827D' => 'Model2',
3810
+ 'E#828D' => 'CFARepeatPatternDim',
3811
+ 'E#828E' => 'CFAPattern2',
3812
+ 'E#828F' => 'BatteryLevel',
3813
+ 'E#8290' => 'KodakIFD',
3814
+ 'E#8298' => 'Copyright',
3815
+ 'E#829A' => 'ExposureTime',
3816
+ 'E#829D' => 'FNumber',
3817
+ 'E#82A5' => 'MDFileTag',
3818
+ 'E#82A6' => 'MDScalePixel',
3819
+ 'E#82A7' => 'MDColorTable',
3820
+ 'E#82A8' => 'MDLabName',
3821
+ 'E#82A9' => 'MDSampleInfo',
3822
+ 'E#82AA' => 'MDPrepDate',
3823
+ 'E#82AB' => 'MDPrepTime',
3824
+ 'E#82AC' => 'MDFileUnits',
3825
+ 'E#830E' => 'PixelScale',
3826
+ 'E#8335' => 'AdventScale',
3827
+ 'E#8336' => 'AdventRevision',
3828
+ 'E#835C' => 'UIC1Tag',
3829
+ 'E#835D' => 'UIC2Tag',
3830
+ 'E#835E' => 'UIC3Tag',
3831
+ 'E#835F' => 'UIC4Tag',
3832
+ 'E#83BB' => 'IPTC-NAA',
3833
+ 'E#847E' => 'IntergraphPacketData',
3834
+ 'E#847F' => 'IntergraphFlagRegisters',
3835
+ 'E#8480' => 'IntergraphMatrix',
3836
+ 'E#8481' => 'INGRReserved',
3837
+ 'E#8482' => 'ModelTiePoint',
3838
+ 'E#84E0' => 'Site',
3839
+ 'E#84E1' => 'ColorSequence',
3840
+ 'E#84E2' => 'IT8Header',
3841
+ 'E#84E3' => 'RasterPadding',
3842
+ 'E#84E4' => 'BitsPerRunLength',
3843
+ 'E#84E5' => 'BitsPerExtendedRunLength',
3844
+ 'E#84E6' => 'ColorTable',
3845
+ 'E#84E7' => 'ImageColorIndicator',
3846
+ 'E#84E8' => 'BackgroundColorIndicator',
3847
+ 'E#84E9' => 'ImageColorValue',
3848
+ 'E#84EA' => 'BackgroundColorValue',
3849
+ 'E#84EB' => 'PixelIntensityRange',
3850
+ 'E#84EC' => 'TransparencyIndicator',
3851
+ 'E#84ED' => 'ColorCharacterization',
3852
+ 'E#84EE' => 'HCUsage',
3853
+ 'E#84EF' => 'TrapIndicator',
3854
+ 'E#84F0' => 'CMYKEquivalent',
3855
+ 'E#8546' => 'SEMInfo',
3856
+ 'E#8568' => 'AFCP_IPTC',
3857
+ 'E#85B8' => 'PixelMagicJBIGOptions',
3858
+ 'E#85D7' => 'JPLCartoIFD',
3859
+ 'E#85D8' => 'ModelTransform',
3860
+ 'E#8602' => 'WB_GRGBLevels',
3861
+ 'E#8606' => 'LeafData',
3862
+ 'E#8649' => 'PhotoshopSettings',
3863
+ 'E#8769' => 'ExifOffset',
3864
+ 'E#8773' => 'ICC_Profile',
3865
+ 'E#877F' => 'TIFF_FXExtensions',
3866
+ 'E#8780' => 'MultiProfiles',
3867
+ 'E#8781' => 'SharedData',
3868
+ 'E#8782' => 'T88Options',
3869
+ 'E#87AC' => 'ImageLayer',
3870
+ 'E#87AF' => 'GeoTiffDirectory',
3871
+ 'E#87B0' => 'GeoTiffDoubleParams',
3872
+ 'E#87B1' => 'GeoTiffAsciiParams',
3873
+ 'E#87BE' => 'JBIGOptions',
3874
+ 'E#8822' => 'ExposureProgram',
3875
+ 'E#8824' => 'SpectralSensitivity',
3876
+ 'E#8825' => 'GPSInfo',
3877
+ 'E#8827' => 'ISO',
3878
+ 'E#8828' => 'Opto-ElectricConvFactor',
3879
+ 'E#8829' => 'Interlace',
3880
+ 'E#882A' => 'TimeZoneOffset',
3881
+ 'E#882B' => 'SelfTimerMode',
3882
+ 'E#8830' => 'SensitivityType',
3883
+ 'E#8831' => 'StandardOutputSensitivity',
3884
+ 'E#8832' => 'RecommendedExposureIndex',
3885
+ 'E#8833' => 'ISOSpeed',
3886
+ 'E#8834' => 'ISOSpeedLatitudeyyy',
3887
+ 'E#8835' => 'ISOSpeedLatitudezzz',
3888
+ 'E#885C' => 'FaxRecvParams',
3889
+ 'E#885D' => 'FaxSubAddress',
3890
+ 'E#885E' => 'FaxRecvTime',
3891
+ 'E#8871' => 'FedexEDR',
3892
+ 'E#888A' => 'LeafSubIFD',
3893
+ 'E#9000' => 'ExifVersion',
3894
+ 'E#9003' => 'DateTimeOriginal',
3895
+ 'E#9004' => 'CreateDate',
3896
+ 'E#9009' => 'GooglePlusUploadCode',
3897
+ 'E#9010' => 'OffsetTime',
3898
+ 'E#9011' => 'OffsetTimeOriginal',
3899
+ 'E#9012' => 'OffsetTimeDigitized',
3900
+ 'E#9101' => 'ComponentsConfiguration',
3901
+ 'E#9102' => 'CompressedBitsPerPixel',
3902
+ 'E#9201' => 'ShutterSpeedValue',
3903
+ 'E#9202' => 'ApertureValue',
3904
+ 'E#9203' => 'BrightnessValue',
3905
+ 'E#9204' => 'ExposureCompensation',
3906
+ 'E#9205' => 'MaxApertureValue',
3907
+ 'E#9206' => 'SubjectDistance',
3908
+ 'E#9207' => 'MeteringMode',
3909
+ 'E#9208' => 'LightSource',
3910
+ 'E#9209' => 'Flash',
3911
+ 'E#920A' => 'FocalLength',
3912
+ 'E#920B' => 'FlashEnergy',
3913
+ 'E#920C' => 'SpatialFrequencyResponse',
3914
+ 'E#920D' => 'Noise',
3915
+ 'E#920E' => 'FocalPlaneXResolution',
3916
+ 'E#920F' => 'FocalPlaneYResolution',
3917
+ 'E#9210' => 'FocalPlaneResolutionUnit',
3918
+ 'E#9211' => 'ImageNumber',
3919
+ 'E#9212' => 'SecurityClassification',
3920
+ 'E#9213' => 'ImageHistory',
3921
+ 'E#9214' => 'SubjectArea',
3922
+ 'E#9215' => 'ExposureIndex',
3923
+ 'E#9216' => 'TIFF-EPStandardID',
3924
+ 'E#9217' => 'SensingMethod',
3925
+ 'E#923A' => 'CIP3DataFile',
3926
+ 'E#923B' => 'CIP3Sheet',
3927
+ 'E#923C' => 'CIP3Side',
3928
+ 'E#923F' => 'StoNits',
3929
+ 'E#927C' => 'MakerNote',
3930
+ 'E#9286' => 'UserComment',
3931
+ 'E#9290' => 'SubSecTime',
3932
+ 'E#9291' => 'SubSecTimeOriginal',
3933
+ 'E#9292' => 'SubSecTimeDigitized',
3934
+ 'E#932F' => 'MSDocumentText',
3935
+ 'E#9330' => 'MSPropertySetStorage',
3936
+ 'E#9331' => 'MSDocumentTextPosition',
3937
+ 'E#935C' => 'ImageSourceData',
3938
+ 'E#9400' => 'AmbientTemperature',
3939
+ 'E#9401' => 'Humidity',
3940
+ 'E#9402' => 'Pressure',
3941
+ 'E#9403' => 'WaterDepth',
3942
+ 'E#9404' => 'Acceleration',
3943
+ 'E#9405' => 'CameraElevationAngle',
3944
+ 'E#9C9B' => 'XPTitle',
3945
+ 'E#9C9C' => 'XPComment',
3946
+ 'E#9C9D' => 'XPAuthor',
3947
+ 'E#9C9E' => 'XPKeywords',
3948
+ 'E#9C9F' => 'XPSubject',
3949
+ 'E#A000' => 'FlashpixVersion',
3950
+ 'E#A001' => 'ColorSpace',
3951
+ 'E#A002' => 'ExifImageWidth',
3952
+ 'E#A003' => 'ExifImageHeight',
3953
+ 'E#A004' => 'RelatedSoundFile',
3954
+ 'E#A005' => 'InteropOffset',
3955
+ 'E#A010' => 'SamsungRawPointersOffset',
3956
+ 'E#A011' => 'SamsungRawPointersLength',
3957
+ 'E#A101' => 'SamsungRawByteOrder',
3958
+ 'E#A102' => 'SamsungRawUnknown?',
3959
+ 'E#A20B' => 'FlashEnergy',
3960
+ 'E#A20C' => 'SpatialFrequencyResponse',
3961
+ 'E#A20D' => 'Noise',
3962
+ 'E#A20E' => 'FocalPlaneXResolution',
3963
+ 'E#A20F' => 'FocalPlaneYResolution',
3964
+ 'E#A210' => 'FocalPlaneResolutionUnit',
3965
+ 'E#A211' => 'ImageNumber',
3966
+ 'E#A212' => 'SecurityClassification',
3967
+ 'E#A213' => 'ImageHistory',
3968
+ 'E#A214' => 'SubjectLocation',
3969
+ 'E#A215' => 'ExposureIndex',
3970
+ 'E#A216' => 'TIFF-EPStandardID',
3971
+ 'E#A217' => 'SensingMethod',
3972
+ 'E#A300' => 'FileSource',
3973
+ 'E#A301' => 'SceneType',
3974
+ 'E#A302' => 'CFAPattern',
3975
+ 'E#A401' => 'CustomRendered',
3976
+ 'E#A402' => 'ExposureMode',
3977
+ 'E#A403' => 'WhiteBalance',
3978
+ 'E#A404' => 'DigitalZoomRatio',
3979
+ 'E#A405' => 'FocalLengthIn35mmFormat',
3980
+ 'E#A406' => 'SceneCaptureType',
3981
+ 'E#A407' => 'GainControl',
3982
+ 'E#A408' => 'Contrast',
3983
+ 'E#A409' => 'Saturation',
3984
+ 'E#A40A' => 'Sharpness',
3985
+ 'E#A40B' => 'DeviceSettingDescription',
3986
+ 'E#A40C' => 'SubjectDistanceRange',
3987
+ 'E#A420' => 'ImageUniqueID',
3988
+ 'E#A430' => 'OwnerName',
3989
+ 'E#A431' => 'SerialNumber',
3990
+ 'E#A432' => 'LensInfo',
3991
+ 'E#A433' => 'LensMake',
3992
+ 'E#A434' => 'LensModel',
3993
+ 'E#A435' => 'LensSerialNumber',
3994
+ 'E#A480' => 'GDALMetadata',
3995
+ 'E#A481' => 'GDALNoData',
3996
+ 'E#A500' => 'Gamma',
3997
+ 'E#AFC0' => 'ExpandSoftware',
3998
+ 'E#AFC1' => 'ExpandLens',
3999
+ 'E#AFC2' => 'ExpandFilm',
4000
+ 'E#AFC3' => 'ExpandFilterLens',
4001
+ 'E#AFC4' => 'ExpandScanner',
4002
+ 'E#AFC5' => 'ExpandFlashLamp',
4003
+ 'E#BC01' => 'PixelFormat',
4004
+ 'E#BC03' => 'Uncompressed',
4005
+ 'E#BC04' => 'ImageType',
4006
+ 'E#BC80' => 'ImageWidth',
4007
+ 'E#BC81' => 'ImageHeight',
4008
+ 'E#BC82' => 'WidthResolution',
4009
+ 'E#BC83' => 'HeightResolution',
4010
+ 'E#BCC0' => 'ImageOffset',
4011
+ 'E#BCC1' => 'ImageByteCount',
4012
+ 'E#BCC2' => 'AlphaOffset',
4013
+ 'E#BCC3' => 'AlphaByteCount',
4014
+ 'E#BCC4' => 'ImageDataDiscard',
4015
+ 'E#BCC5' => 'AlphaDataDiscard',
4016
+ 'E#C427' => 'OceScanjobDesc',
4017
+ 'E#C428' => 'OceApplicationSelector',
4018
+ 'E#C429' => 'OceIDNumber',
4019
+ 'E#C42A' => 'OceImageLogic',
4020
+ 'E#C44F' => 'Annotations',
4021
+ 'E#C4A5' => 'PrintIM',
4022
+ 'E#C573' => 'OriginalFileName',
4023
+ 'E#C580' => 'USPTOOriginalContentType',
4024
+ 'E#C5E0' => 'CR2CFAPattern',
4025
+ 'E#C612' => 'DNGVersion',
4026
+ 'E#C613' => 'DNGBackwardVersion',
4027
+ 'E#C614' => 'UniqueCameraModel',
4028
+ 'E#C615' => 'LocalizedCameraModel',
4029
+ 'E#C616' => 'CFAPlaneColor',
4030
+ 'E#C617' => 'CFALayout',
4031
+ 'E#C618' => 'LinearizationTable',
4032
+ 'E#C619' => 'BlackLevelRepeatDim',
4033
+ 'E#C61A' => 'BlackLevel',
4034
+ 'E#C61B' => 'BlackLevelDeltaH',
4035
+ 'E#C61C' => 'BlackLevelDeltaV',
4036
+ 'E#C61D' => 'WhiteLevel',
4037
+ 'E#C61E' => 'DefaultScale',
4038
+ 'E#C61F' => 'DefaultCropOrigin',
4039
+ 'E#C620' => 'DefaultCropSize',
4040
+ 'E#C621' => 'ColorMatrix1',
4041
+ 'E#C622' => 'ColorMatrix2',
4042
+ 'E#C623' => 'CameraCalibration1',
4043
+ 'E#C624' => 'CameraCalibration2',
4044
+ 'E#C625' => 'ReductionMatrix1',
4045
+ 'E#C626' => 'ReductionMatrix2',
4046
+ 'E#C627' => 'AnalogBalance',
4047
+ 'E#C628' => 'AsShotNeutral',
4048
+ 'E#C629' => 'AsShotWhiteXY',
4049
+ 'E#C62A' => 'BaselineExposure',
4050
+ 'E#C62B' => 'BaselineNoise',
4051
+ 'E#C62C' => 'BaselineSharpness',
4052
+ 'E#C62D' => 'BayerGreenSplit',
4053
+ 'E#C62E' => 'LinearResponseLimit',
4054
+ 'E#C62F' => 'CameraSerialNumber',
4055
+ 'E#C630' => 'DNGLensInfo',
4056
+ 'E#C631' => 'ChromaBlurRadius',
4057
+ 'E#C632' => 'AntiAliasStrength',
4058
+ 'E#C633' => 'ShadowScale',
4059
+ 'E#C640' => 'RawImageSegmentation',
4060
+ 'E#C65A' => 'CalibrationIlluminant1',
4061
+ 'E#C65B' => 'CalibrationIlluminant2',
4062
+ 'E#C65C' => 'BestQualityScale',
4063
+ 'E#C65D' => 'RawDataUniqueID',
4064
+ 'E#C660' => 'AliasLayerMetadata',
4065
+ 'E#C68B' => 'OriginalRawFileName',
4066
+ 'E#C68C' => 'OriginalRawFileData',
4067
+ 'E#C68D' => 'ActiveArea',
4068
+ 'E#C68E' => 'MaskedAreas',
4069
+ 'E#C68F' => 'AsShotICCProfile',
4070
+ 'E#C690' => 'AsShotPreProfileMatrix',
4071
+ 'E#C691' => 'CurrentICCProfile',
4072
+ 'E#C692' => 'CurrentPreProfileMatrix',
4073
+ 'E#C6Bf' => 'ColorimetricReference',
4074
+ 'E#C6C5' => 'SRawType',
4075
+ 'E#C6D2' => 'PanasonicTitle',
4076
+ 'E#C6D3' => 'PanasonicTitle2',
4077
+ 'E#C6F3' => 'CameraCalibrationSig',
4078
+ 'E#C6F4' => 'ProfileCalibrationSig',
4079
+ 'E#C6F5' => 'ProfileIFD',
4080
+ 'E#C6F6' => 'AsShotProfileName',
4081
+ 'E#C6F7' => 'NoiseReductionApplied',
4082
+ 'E#C6F8' => 'ProfileName',
4083
+ 'E#C6F9' => 'ProfileHueSatMapDims',
4084
+ 'E#C6FA' => 'ProfileHueSatMapData1',
4085
+ 'E#C6FB' => 'ProfileHueSatMapData2',
4086
+ 'E#C6FC' => 'ProfileToneCurve',
4087
+ 'E#C6FD' => 'ProfileEmbedPolicy',
4088
+ 'E#C6FE' => 'ProfileCopyright',
4089
+ 'E#C714' => 'ForwardMatrix1',
4090
+ 'E#C715' => 'ForwardMatrix2',
4091
+ 'E#C716' => 'PreviewApplicationName',
4092
+ 'E#C717' => 'PreviewApplicationVersion',
4093
+ 'E#C718' => 'PreviewSettingsName',
4094
+ 'E#C719' => 'PreviewSettingsDigest',
4095
+ 'E#C71A' => 'PreviewColorSpace',
4096
+ 'E#C71B' => 'PreviewDateTime',
4097
+ 'E#C71C' => 'RawImageDigest',
4098
+ 'E#C71D' => 'OriginalRawFileDigest',
4099
+ 'E#C71E' => 'SubTileBlockSize',
4100
+ 'E#C71F' => 'RowInterleaveFactor',
4101
+ 'E#C725' => 'ProfileLookTableDims',
4102
+ 'E#C726' => 'ProfileLookTableData',
4103
+ 'E#C740' => 'OpcodeList1',
4104
+ 'E#C741' => 'OpcodeList2',
4105
+ 'E#C74E' => 'OpcodeList3',
4106
+ 'E#C761' => 'NoiseProfile',
4107
+ 'E#C763' => 'TimeCodes',
4108
+ 'E#C764' => 'FrameRate',
4109
+ 'E#C772' => 'TStop',
4110
+ 'E#C789' => 'ReelName',
4111
+ 'E#C791' => 'OriginalDefaultFinalSize',
4112
+ 'E#C792' => 'OriginalBestQualitySize',
4113
+ 'E#C793' => 'OriginalDefaultCropSize',
4114
+ 'E#C7A1' => 'CameraLabel',
4115
+ 'E#C7A3' => 'ProfileHueSatMapEncoding',
4116
+ 'E#C7A4' => 'ProfileLookTableEncoding',
4117
+ 'E#C7A5' => 'BaselineExposureOffset',
4118
+ 'E#C7A6' => 'DefaultBlackRender',
4119
+ 'E#C7A7' => 'NewRawImageDigest',
4120
+ 'E#C7A8' => 'RawToPreviewGain',
4121
+ 'E#C7B5' => 'DefaultUserCrop',
4122
+ 'E#EA1C' => 'Padding',
4123
+ 'E#EA1D' => 'OffsetSchema',
4124
+ 'E#FDE8' => 'OwnerName',
4125
+ 'E#FDE9' => 'SerialNumber',
4126
+ 'E#FDEA' => 'Lens',
4127
+ 'E#FE00' => 'KDC_IFD',
4128
+ 'E#FE4C' => 'RawFile',
4129
+ 'E#FE4D' => 'Converter',
4130
+ 'E#FE4E' => 'WhiteBalance',
4131
+ 'E#FE51' => 'Exposure',
4132
+ 'E#FE52' => 'Shadows',
4133
+ 'E#FE53' => 'Brightness',
4134
+ 'E#FE54' => 'Contrast',
4135
+ 'E#FE55' => 'Saturation',
4136
+ 'E#FE56' => 'Sharpness',
4137
+ 'E#FE57' => 'Smoothness',
4138
+ 'E#FE58' => 'MoireFilter',
4139
 
4140
  );
4141
  }
4142
 
4143
+ if ( empty( $gpstags ) ) {
4144
+ $gpstags = array( 'G#0000' => 'GPSVersionID',
4145
+ 'G#0001' => 'GPSLatitudeRef',
4146
+ 'G#0002' => 'GPSLatitude',
4147
+ 'G#0003' => 'GPSLongitudeRef',
4148
+ 'G#0004' => 'GPSLongitude',
4149
+ 'G#0005' => 'GPSAltitudeRef',
4150
+ 'G#0006' => 'GPSAltitude',
4151
+ 'G#0007' => 'GPSTimeStamp',
4152
+ 'G#0008' => 'GPSSatellites',
4153
+ 'G#0009' => 'GPSStatus',
4154
+ 'G#000A' => 'GPSMeasureMode',
4155
+ 'G#000B' => 'GPSDOP',
4156
+ 'G#000C' => 'GPSSpeedRef',
4157
+ 'G#000D' => 'GPSSpeed',
4158
+ 'G#000E' => 'GPSTrackRef',
4159
+ 'G#000F' => 'GPSTrack',
4160
+ 'G#0010' => 'GPSImgDirectionRef',
4161
+ 'G#0011' => 'GPSImgDirection',
4162
+ 'G#0012' => 'GPSMapDatum',
4163
+ 'G#0013' => 'GPSDestLatitudeRef',
4164
+ 'G#0014' => 'GPSDestLatitude',
4165
+ 'G#0015' => 'GPSDestLongitudeRef',
4166
+ 'G#0016' => 'GPSDestLongitude',
4167
+ 'G#0017' => 'GPSDestBearingRef',
4168
+ 'G#0018' => 'GPSDestBearing',
4169
+ 'G#0019' => 'GPSDestDistanceRef',
4170
+ 'G#001A' => 'GPSDestDistance',
4171
+ 'G#001B' => 'GPSProcessingMethod',
4172
+ 'G#001C' => 'GPSAreaInformation',
4173
+ 'G#001D' => 'GPSDateStamp',
4174
+ 'G#001e' => 'GPSDifferential',
4175
+ 'G#001F' => 'GPSHPositioningError',
4176
+
4177
+ );
4178
+ }
4179
+
4180
+ if ( empty( $filetags ) ) {
4181
+ $filetags = array( 'F#0001' => 'FileName',
4182
+ 'F#0002' => 'FileDateTime',
4183
+ 'F#0003' => 'FileSize',
4184
+ 'F#0004' => 'FileType',
4185
+ 'F#0005' => 'MimeType',
4186
+ 'F#0006' => 'SectionsFound',
4187
+ );
4188
+ }
4189
+
4190
  // Init
4191
  $result = '';
4192
 
4231
  }
4232
  }
4233
 
4234
+ // Not found? Try gpstags
4235
+ if ( ! $result ) {
4236
+ if ( isset( $gpstags[$tag] ) ) {
4237
+ $result = $gpstags[$tag];
4238
+ }
4239
+ }
4240
+
4241
+ // Not found? Try filetags
4242
+ if ( ! $result ) {
4243
+ if ( isset( $filetags[$tag] ) ) {
4244
+ $result = $filetags[$tag];
4245
+ }
4246
+ }
4247
+
4248
  // Not found? Find generic tag name
4249
  if ( ! $result ) {
4250
+ $hextag = hexdec( substr( $tag, 2,4 ) );
4251
+ $result = exif_tagname( $hextag );
4252
  if ( ! $result ) {
4253
+ wppa_log( 'dbg', 'exif_tagname found nothing for ' . $tag );
4254
+ $result = sprintf( 'UndefinedTag:0x%04X', $hextag );
4255
  }
4256
  }
4257
 
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -2169,11 +2169,16 @@ static $user;
2169
  if ( ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
2170
  $name = esc_js( wppa_get_photo_name( $id ) );
2171
  if ( ! $name ) $name = '&nbsp;';
2172
- $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
2173
- 'addmedal' => true,
2174
- 'escjs' => true,
2175
- 'showname' => wppa_switch( 'show_full_name' ),
2176
- ) );
 
 
 
 
 
2177
  if ( ! $fullname ) $fullname = '&nbsp;';
2178
  }
2179
 
@@ -4380,6 +4385,7 @@ global $wppa_upload_succes_id;
4380
 
4381
  // Do Upload
4382
  if ( $may_upload ) {
 
4383
  $blogged = false;
4384
  if ( wppa_get_post( 'wppa-upload-album' ) ) { // Upload photo
4385
  $nonce = wppa_get_post( 'nonce' );
@@ -4444,6 +4450,8 @@ global $wppa_upload_succes_id;
4444
 
4445
  // Init alert text with possible results from wppa_do_frontend_file_upload()
4446
  $alert = $wppa_alert;
 
 
4447
 
4448
  if ( $done ) {
4449
 
@@ -4471,54 +4479,75 @@ global $wppa_upload_succes_id;
4471
  if ( $post_id > 0 ) {
4472
  $blogged = true;
4473
  }
 
 
 
4474
  }
4475
 
4476
  // Alert text for upload
 
4477
  if ( wppa_opt( 'fe_alert' ) == 'upcre' || wppa_opt( 'fe_alert' ) == 'all' ) {
4478
- $alert .= ' ' . esc_js( sprintf( _n( '%d photo successfully uploaded', '%d photos successfully uploaded', $done, 'wp-photo-album-plus' ), $done ) ) . '.';
4479
  }
 
 
4480
 
4481
  // ADD POINTS
4482
  $points = wppa_opt( 'cp_points_upload' ) * $done;
4483
  $bret = wppa_add_credit_points( $points, __( 'Photo upload' ,'wp-photo-album-plus' ) );
4484
 
4485
  // Alert text for points
 
4486
  if ( $bret && wppa_opt( 'fe_alert' ) != '-none-' ) {
4487
- $alert .= ' ' . esc_js( sprintf( __( '%s points added' ,'wp-photo-album-plus' ), $points ) ) . '.';
 
 
 
4488
  }
4489
 
4490
  // Alert text for blogged
 
 
 
 
 
 
4491
  if ( $blogged && ( wppa_opt( 'fe_alert' ) == 'blog' || wppa_opt( 'fe_alert' ) == 'all' ) ) {
4492
- if ( $status == 'pending' ) {
4493
- $alert .= ' ' . esc_js( __( 'Your post is awaiting moderation.', 'wp-photo-album-plus' ) );
4494
- }
4495
- else {
4496
- $alert .= ' ' . esc_js( __( 'Your post is published.', 'wp-photo-album-plus' ) );
4497
- }
 
 
4498
  }
4499
  }
4500
 
4501
  // Alert text for failed upload
4502
  if ( $fail ) {
4503
  if ( ! $done ) {
4504
- $alert .= ' ' . __( 'Upload failed', 'wp-photo-album-plus' ) . '.';
4505
  }
4506
  else {
4507
- $alert .= ' ' . sprintf( _n( '%d upload failed', '%d uploads failed', $fail, 'wp-photo-album-plus' ), $fail ) . '.';
4508
  }
4509
-
 
4510
  }
4511
 
4512
  // Clean alert text
4513
  $alert = trim( $alert );
4514
 
 
 
 
 
 
4515
  // Alert only when requested or fail
4516
  if ( wppa_opt( 'fe_alert' ) != '-none-' || $fail ) {
4517
  wppa_alert( $alert, $reload );
4518
  }
4519
- // elseif( ! $blogged ) {
4520
- // wppa_alert( '', $reload );
4521
- // }
4522
 
4523
  // Redirect to blogpost
4524
  if ( $blogged ) {
@@ -5063,6 +5092,8 @@ function wppa_get_lbtitle( $type, $id ) {
5063
  $do_desc = wppa_switch( 'ovl_'.$type.'_desc' );
5064
  $do_sm = wppa_switch( 'share_on_lightbox' );
5065
 
 
 
5066
  $result = '';
5067
  if ( $do_download ) {
5068
  if ( wppa_opt( 'art_monkey_display' ) == 'button' ) {
@@ -5072,8 +5103,7 @@ function wppa_get_lbtitle( $type, $id ) {
5072
  ' style="cursor:pointer; margin-bottom:0px; max-width:500px;"' .
5073
  ' class="wppa-download-button wppa-ovl-button"' .
5074
  ' onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( ' . wppa( 'mocc' ) . ', \'' . wppa_encrypt_photo($id) .'\' );"' .
5075
- ' value="' . rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' .
5076
- wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_'.$type.'_name' ) ) ) ) .
5077
  '"' .
5078
  ' />';
5079
  }
@@ -5083,8 +5113,7 @@ function wppa_get_lbtitle( $type, $id ) {
5083
  ' style="cursor:pointer;"' .
5084
  ' onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( '.wppa( 'mocc' ).', \''.wppa_encrypt_photo($id).'\' );"' .
5085
  ' >' .
5086
- rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' .
5087
- wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_'.$type.'_name' ) ) ) ) .
5088
  '</a>';
5089
  }
5090
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.8.01
7
  *
8
  */
9
 
2169
  if ( ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
2170
  $name = esc_js( wppa_get_photo_name( $id ) );
2171
  if ( ! $name ) $name = '&nbsp;';
2172
+ if ( wppa_is_pdf( $id ) ) {
2173
+ $fullname = esc_js( wppa_get_photo_item( $id, 'filename' ) );
2174
+ }
2175
+ else {
2176
+ $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
2177
+ 'addmedal' => true,
2178
+ 'escjs' => true,
2179
+ 'showname' => wppa_switch( 'show_full_name' ),
2180
+ ) );
2181
+ }
2182
  if ( ! $fullname ) $fullname = '&nbsp;';
2183
  }
2184
 
4385
 
4386
  // Do Upload
4387
  if ( $may_upload ) {
4388
+ $upload_message = '';
4389
  $blogged = false;
4390
  if ( wppa_get_post( 'wppa-upload-album' ) ) { // Upload photo
4391
  $nonce = wppa_get_post( 'nonce' );
4450
 
4451
  // Init alert text with possible results from wppa_do_frontend_file_upload()
4452
  $alert = $wppa_alert;
4453
+ $upload_message = $alert;
4454
+ $blog_failed = false;
4455
 
4456
  if ( $done ) {
4457
 
4479
  if ( $post_id > 0 ) {
4480
  $blogged = true;
4481
  }
4482
+ else {
4483
+ $blg_failed = true;
4484
+ }
4485
  }
4486
 
4487
  // Alert text for upload
4488
+ $m = ' ' . esc_js( sprintf( _n( '%d photo successfully uploaded', '%d photos successfully uploaded', $done, 'wp-photo-album-plus' ), $done ) ) . '.';
4489
  if ( wppa_opt( 'fe_alert' ) == 'upcre' || wppa_opt( 'fe_alert' ) == 'all' ) {
4490
+ $alert .= $m;
4491
  }
4492
+ $upload_message .= $m;
4493
+
4494
 
4495
  // ADD POINTS
4496
  $points = wppa_opt( 'cp_points_upload' ) * $done;
4497
  $bret = wppa_add_credit_points( $points, __( 'Photo upload' ,'wp-photo-album-plus' ) );
4498
 
4499
  // Alert text for points
4500
+ $m = ' ' . esc_js( sprintf( __( '%s points added' ,'wp-photo-album-plus' ), $points ) ) . '.';
4501
  if ( $bret && wppa_opt( 'fe_alert' ) != '-none-' ) {
4502
+ $alert .= $m;
4503
+ }
4504
+ elseif( $bret ) {
4505
+ $upload_message .= $m;
4506
  }
4507
 
4508
  // Alert text for blogged
4509
+ if ( $status == 'pending' ) {
4510
+ $m = ' ' . __( 'Your post is awaiting moderation.', 'wp-photo-album-plus' );
4511
+ }
4512
+ else {
4513
+ $m = ' ' . __( 'Your post is published.', 'wp-photo-album-plus' );
4514
+ }
4515
  if ( $blogged && ( wppa_opt( 'fe_alert' ) == 'blog' || wppa_opt( 'fe_alert' ) == 'all' ) ) {
4516
+ $alert .= $m;
4517
+ $upload_message .= $m;
4518
+ }
4519
+
4520
+ if ( $blog_failed ) {
4521
+ $m = ' ' . __( 'Blog failed', 'wp-photo-album-plus' );
4522
+ $alert .= $m;
4523
+ $upload_message .= $m;
4524
  }
4525
  }
4526
 
4527
  // Alert text for failed upload
4528
  if ( $fail ) {
4529
  if ( ! $done ) {
4530
+ $m = ' ' . __( 'Upload failed', 'wp-photo-album-plus' ) . '.';
4531
  }
4532
  else {
4533
+ $m = ' ' . sprintf( _n( '%d upload failed', '%d uploads failed', $fail, 'wp-photo-album-plus' ), $fail ) . '.';
4534
  }
4535
+ $alert .= $m;
4536
+ $upload_message .= $m;
4537
  }
4538
 
4539
  // Clean alert text
4540
  $alert = trim( $alert );
4541
 
4542
+ // Output if fe upload ajax
4543
+ if ( wppa_switch( 'ajax_upload' ) && wppa_browser_can_html5() ) {
4544
+ echo $upload_message;
4545
+ }
4546
+
4547
  // Alert only when requested or fail
4548
  if ( wppa_opt( 'fe_alert' ) != '-none-' || $fail ) {
4549
  wppa_alert( $alert, $reload );
4550
  }
 
 
 
4551
 
4552
  // Redirect to blogpost
4553
  if ( $blogged ) {
5092
  $do_desc = wppa_switch( 'ovl_'.$type.'_desc' );
5093
  $do_sm = wppa_switch( 'share_on_lightbox' );
5094
 
5095
+ $dl_name = wppa_is_pdf( $id ) ? wppa_get_photo_item( $id, 'filename' ) : wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_'.$type.'_name' ) ) );
5096
+
5097
  $result = '';
5098
  if ( $do_download ) {
5099
  if ( wppa_opt( 'art_monkey_display' ) == 'button' ) {
5103
  ' style="cursor:pointer; margin-bottom:0px; max-width:500px;"' .
5104
  ' class="wppa-download-button wppa-ovl-button"' .
5105
  ' onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( ' . wppa( 'mocc' ) . ', \'' . wppa_encrypt_photo($id) .'\' );"' .
5106
+ ' value="' . rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' . $dl_name ) .
 
5107
  '"' .
5108
  ' />';
5109
  }
5113
  ' style="cursor:pointer;"' .
5114
  ' onclick="' . ( wppa_is_safari() && ( wppa_opt( 'art_monkey_link' ) == 'file' ) ? 'wppaWindowReference = window.open();' : '' ) . 'wppaAjaxMakeOrigName( '.wppa( 'mocc' ).', \''.wppa_encrypt_photo($id).'\' );"' .
5115
  ' >' .
5116
+ rtrim( __( 'Download' , 'wp-photo-album-plus') . ' ' . $dl_name ) .
 
5117
  '</a>';
5118
  }
5119
  }
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -90,7 +90,7 @@ global $wppa_timestamp_start;
90
  return;
91
  }
92
 
93
-
94
  // Check for multiple maintenance procs
95
  if ( ! wppa_switch( 'maint_ignore_concurrency_error' ) && ! wppa_is_cron() ) {
96
 
@@ -102,7 +102,7 @@ global $wppa_timestamp_start;
102
  }
103
  }
104
  }
105
-
106
  // Lock this proc
107
  if ( wppa_is_cron() ) {
108
  update_option( $slug.'_user', 'cron-job' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.8.01
7
  *
8
  */
9
 
90
  return;
91
  }
92
 
93
+ /*
94
  // Check for multiple maintenance procs
95
  if ( ! wppa_switch( 'maint_ignore_concurrency_error' ) && ! wppa_is_cron() ) {
96
 
102
  }
103
  }
104
  }
105
+ */
106
  // Lock this proc
107
  if ( wppa_is_cron() ) {
108
  update_option( $slug.'_user', 'cron-job' );
wppa-mobile.php CHANGED
@@ -77,7 +77,7 @@ class wppa_mobile_detect {
77
  return $this->isMobile;
78
  }
79
 
80
- protected function isDevice($device) {
81
  $var = "is" . ucfirst($device);
82
  $return = $this->$var === null ? (bool) preg_match("/" . $this->devices[$device] . "/i", $this->userAgent) : $this->$var;
83
 
77
  return $this->isMobile;
78
  }
79
 
80
+ public function isDevice($device) {
81
  $var = "is" . ucfirst($device);
82
  $return = $this->$var === null ? (bool) preg_match("/" . $this->devices[$device] . "/i", $this->userAgent) : $this->$var;
83
 
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -1256,12 +1256,12 @@ function wppaToggleExif( id, count ) {
1256
 
1257
  // If not done yet, get the album options html with the current album excluded
1258
  if ( ! isset( $album_select[$album] ) ) {
1259
- $album_select[$album] = wppa_album_select_a( array( 'checkaccess' => true,
1260
- 'path' => wppa_switch( 'hier_albsel' ),
1261
- 'exclude' => $album,
1262
- 'selected' => '0',
1263
- 'addpleaseselect' => true,
1264
- 'sort' => true,
1265
  )
1266
  );
1267
  }
@@ -1270,7 +1270,7 @@ function wppaToggleExif( id, count ) {
1270
  __( 'Target album for copy/move:', 'wp-photo-album-plus' ) .
1271
  '<select' .
1272
  ' id="target-' . $id . '"' .
1273
- ' style="max-width:500px;"' .
1274
  ' >' .
1275
  $album_select[$album] .
1276
  '</select>';
@@ -1767,16 +1767,12 @@ function wppaToggleExif( id, count ) {
1767
  '<span class="description" >' .
1768
  __( 'Separate tags with commas.', 'wp-photo-album-plus') .
1769
  '</span>' : '' ) .
1770
- '</td>';
1771
-
1772
- echo
1773
- '<td>' .
1774
  '<select' .
1775
  ' onchange="wppaAddTag( this.value, \'tags-' . $id . '\' ); wppaAjaxUpdatePhoto( ' . $id . ', \'tags\', document.getElementById( \'tags-' . $id . '\' ) )"' .
1776
  ' >';
1777
  $taglist = wppa_get_taglist();
1778
  if ( is_array( $taglist ) ) {
1779
- echo '<option value="" >' . __( '- select -', 'wp-photo-album-plus' ) . '</option>';
1780
  foreach ( $taglist as $tag ) {
1781
  echo '<option value="' . $tag['tag'] . '" >' . $tag['tag'] . '</option>';
1782
  }
@@ -1789,10 +1785,8 @@ function wppaToggleExif( id, count ) {
1789
  }
1790
  echo
1791
  '</select>' .
1792
- '<br />' .
1793
- '<span class="description" >' .
1794
- __( 'Select to add', 'wp-photo-album-plus' ) .
1795
- '</span>' .
1796
  '</td>';
1797
  '</tr>';
1798
 
@@ -2054,37 +2048,41 @@ function wppaToggleExif( id, count ) {
2054
  '<table' .
2055
  ' id="wppa-exif-' . $id . '"' .
2056
  ' class="wppa-table wppa-photo-table"' .
2057
- ' style="clear:both;width:100%;display:none;"' .
2058
  ' >' .
2059
  '<thead>' .
2060
  '<tr style="font-weight:bold;" >' .
2061
  '<td style="padding:0 4px;" >Exif tag</td>' .
2062
  '<td style="padding:0 4px;" >Brand</td>' .
2063
  '<td style="padding:0 4px;" >Description</td>' .
2064
- '<td style="padding:0 4px;max-width:30%;" >Raw value</td>' .
2065
- '<td style="padding:0 4px;max-width:30%;" >Formatted value</td>' .
2066
  '</tr>' .
2067
  '</thead>' .
2068
  '<tbody>';
2069
 
2070
  foreach ( $exifs as $exif ) {
 
 
 
 
2071
  echo '
2072
  <tr id="exif-tr-' . $exif['id'] . '" >
2073
  <td style="padding:0 4px;" >'.$exif['tag'].'</td>';
2074
 
2075
- if ( $brand && $exif['brand'] ) { // * wppa_exif_tagname( hexdec( substr( $exif['tag'], 2, 4 ) ), $brand, 'brandonly' ) ) {
2076
- echo '
2077
- <td style="padding:0 4px;" >' . $brand . '</td>
2078
- <td style="padding:0 4px;" >' . wppa_exif_tagname( hexdec( substr( $exif['tag'], 2, 4 ) ), $brand, 'brandonly' ) . ':</td>';
2079
- }
2080
- else {
2081
- echo '
2082
- <td style="padding:0 4px;" ></td>
2083
- <td style="padding:0 4px;" >' . wppa_exif_tagname( hexdec( substr( $exif['tag'], 2, 4 ) ) ) . ':</td>';
2084
- }
2085
 
2086
  echo '
2087
- <td style="padding:0 4px;" >'.$exif['description'].'</td>
2088
  <td style="padding:0 4px;" >' .
2089
  ( $exif['f_description'] == __( 'n.a.', 'wp-photo-album-plus' ) ? wppa_format_exif( $exif['tag'], $exif['description'] ) : $exif['f_description'] ) .
2090
  '</td>
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 6.8.01
7
  *
8
  */
9
 
1256
 
1257
  // If not done yet, get the album options html with the current album excluded
1258
  if ( ! isset( $album_select[$album] ) ) {
1259
+ $album_select[$album] = wppa_album_select_a( array( 'checkaccess' => true,
1260
+ 'path' => wppa_switch( 'hier_albsel' ),
1261
+ 'exclude' => $album,
1262
+ 'selected' => '0',
1263
+ 'addpleaseselect' => true,
1264
+ 'sort' => true,
1265
  )
1266
  );
1267
  }
1270
  __( 'Target album for copy/move:', 'wp-photo-album-plus' ) .
1271
  '<select' .
1272
  ' id="target-' . $id . '"' .
1273
+ ' style="max-width:350px;"' .
1274
  ' >' .
1275
  $album_select[$album] .
1276
  '</select>';
1767
  '<span class="description" >' .
1768
  __( 'Separate tags with commas.', 'wp-photo-album-plus') .
1769
  '</span>' : '' ) .
 
 
 
 
1770
  '<select' .
1771
  ' onchange="wppaAddTag( this.value, \'tags-' . $id . '\' ); wppaAjaxUpdatePhoto( ' . $id . ', \'tags\', document.getElementById( \'tags-' . $id . '\' ) )"' .
1772
  ' >';
1773
  $taglist = wppa_get_taglist();
1774
  if ( is_array( $taglist ) ) {
1775
+ echo '<option value="" >' . __( '- select to add -', 'wp-photo-album-plus' ) . '</option>';
1776
  foreach ( $taglist as $tag ) {
1777
  echo '<option value="' . $tag['tag'] . '" >' . $tag['tag'] . '</option>';
1778
  }
1785
  }
1786
  echo
1787
  '</select>' .
1788
+ '</td>' .
1789
+ '<td>' .
 
 
1790
  '</td>';
1791
  '</tr>';
1792
 
2048
  '<table' .
2049
  ' id="wppa-exif-' . $id . '"' .
2050
  ' class="wppa-table wppa-photo-table"' .
2051
+ ' style="clear:both;width:99%;display:none;"' .
2052
  ' >' .
2053
  '<thead>' .
2054
  '<tr style="font-weight:bold;" >' .
2055
  '<td style="padding:0 4px;" >Exif tag</td>' .
2056
  '<td style="padding:0 4px;" >Brand</td>' .
2057
  '<td style="padding:0 4px;" >Description</td>' .
2058
+ '<td style="padding:0 4px;" >Raw value</td>' .
2059
+ '<td style="padding:0 4px;" >Formatted value</td>' .
2060
  '</tr>' .
2061
  '</thead>' .
2062
  '<tbody>';
2063
 
2064
  foreach ( $exifs as $exif ) {
2065
+ $desc = $exif['description'];
2066
+ if ( is_serialized( $desc ) ) {
2067
+ $desc = 'Array(' . count( unserialize( $desc ) ) . ')';
2068
+ }
2069
  echo '
2070
  <tr id="exif-tr-' . $exif['id'] . '" >
2071
  <td style="padding:0 4px;" >'.$exif['tag'].'</td>';
2072
 
2073
+ if ( $brand && $exif['brand'] ) {
2074
+ echo '
2075
+ <td style="padding:0 4px;" >' . $brand . '</td>
2076
+ <td style="padding:0 4px;" >' . wppa_exif_tagname( $exif['tag'], $brand, 'brandonly' ) . ':</td>';
2077
+ }
2078
+ else {
2079
+ echo '
2080
+ <td style="padding:0 4px;" ></td>
2081
+ <td style="padding:0 4px;" >' . wppa_exif_tagname( $exif['tag'] ) . ':</td>';
2082
+ }
2083
 
2084
  echo '
2085
+ <td style="padding:0 4px;" >'.$desc.'</td>
2086
  <td style="padding:0 4px;" >' .
2087
  ( $exif['f_description'] == __( 'n.a.', 'wp-photo-album-plus' ) ? wppa_format_exif( $exif['tag'], $exif['description'] ) : $exif['f_description'] ) .
2088
  '</td>
wppa-potd-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  * admin photo of the day widget
6
- * version 6.7.01
7
  *
8
  */
9
 
@@ -565,7 +565,7 @@ global $wppa_opt;
565
  $result .= '<td></td>';
566
  }
567
 
568
- if ( $help || ( defined( 'WP_DEBUG') && WP_DEBUG ) ) {
569
  $is_dflt = true;
570
  $hlp = esc_js($name).':\n\n'.$help;
571
  if ( ! $no_default ) {
@@ -587,7 +587,20 @@ global $wppa_opt;
587
  }
588
  }
589
  }
590
- $result .= '<td><input type="button" style="font-size: 11px; height:20px; padding:0; cursor: pointer;" title="'.__('Click for help', 'wp-photo-album-plus').'" onclick="alert('."'".$hlp."'".')" value="&nbsp;' . ( $is_dflt ? '?' : '!' ) . '&nbsp;"></td>';
 
 
 
 
 
 
 
 
 
 
 
 
 
591
  }
592
  else {
593
  $result .= '<td></td>';//$hlp = __('No help available');
@@ -595,6 +608,15 @@ global $wppa_opt;
595
 
596
  $result .= '</tr>';
597
 
 
 
 
 
 
 
 
 
 
598
  echo $result;
599
 
600
  }
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  * admin photo of the day widget
6
+ * version 6.8.01
7
  *
8
  */
9
 
565
  $result .= '<td></td>';
566
  }
567
 
568
+ if ( $help ) { //|| ( defined( 'WP_DEBUG') && WP_DEBUG ) ) {
569
  $is_dflt = true;
570
  $hlp = esc_js($name).':\n\n'.$help;
571
  if ( ! $no_default ) {
587
  }
588
  }
589
  }
590
+
591
+ $result .=
592
+ '<td>' .
593
+ '<input' .
594
+ ' type="button"' .
595
+ ' style="font-size: 11px; height:20px; padding:0; cursor: pointer;"' .
596
+ ' title="'.__('Click for help', 'wp-photo-album-plus').'"' .
597
+ ' onclick="' .
598
+ 'jQuery( \'#' . $wppa_table.$wppa_subtable.$num.'-help\' ).css(\'display\',\'\');' .
599
+ 'jQuery( this ).css( \'display\', \'none\' );' .
600
+ '"' .
601
+ ' value="&nbsp;?&nbsp;"' .
602
+ ' />' .
603
+ '</td>';
604
  }
605
  else {
606
  $result .= '<td></td>';//$hlp = __('No help available');
608
 
609
  $result .= '</tr>';
610
 
611
+ if ( $help ) {
612
+ $result .=
613
+ '<tr id="'.$wppa_table.$wppa_subtable.$num.'-help" class="wppa-setting-help wppa-'.$wppa_table.'-'.$wppa_subtable.'-help " style="display:none;" >' .
614
+ '<td></td>' . // num
615
+ '<td></td>' . // name
616
+ '<td colspan="3" style="color:#000077;" ><small><i>' . stripslashes( str_replace( '\n', ' ', $hlp ) ) . '</i></small></td>' .
617
+ '</tr>';
618
+ }
619
+
620
  echo $result;
621
 
622
  }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -27,24 +27,6 @@ global $wp_version;
27
  global $wppa_supported_camara_brands;
28
 
29
  // Start test area
30
- //$photo = 254;
31
- //$exif = exif_read_data(wppa_get_source_path($photo),'ANY_TAG',true);
32
- //var_export($exif);
33
- //echo '<br />';
34
- //$t = 0x0000;
35
- //while ( $t < 0x10000 ) {
36
- // $n = exif_tagname( $t );
37
- // if ( $n ) echo sprintf( '%04x: %s<br />', $t, $n );
38
- // $t++;
39
- //}
40
- //$exif = exif_read_data(wppa_get_source_path($photo));
41
- //var_export($exif);
42
- //if (is_file(wppa_get_source_path( 1632 ))) {
43
- //wppa_import_exif( 1632, wppa_get_source_path( 1632 ) );
44
- //wppa_fix_exif_format( 1632 );
45
- //echo 'done';
46
- //}
47
- //else {echo 'not found';}
48
 
49
  // End test area
50
 
@@ -456,6 +438,18 @@ global $wppa_supported_camara_brands;
456
  <input type="button" style="display:none;" class="wppa-quick" onclick="jQuery('.-wppa-quick').css('display','inline');jQuery('.wppa-quick').css('display','none')" value="<?php _e('Close quick setup', 'wp-photo-album-plus') ?>" />
457
  <?php } ?>
458
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  <?php
460
  if ( get_option( 'wppa_prevrev' ) == '100' && get_option('wppa_i_done') != 'done' ) {
461
  ?>
@@ -696,7 +690,7 @@ global $wppa_supported_camara_brands;
696
  $opts = array('', __('yes', 'wp-photo-album-plus'), __('no', 'wp-photo-album-plus'));
697
  $vals = array('', 'yes', 'no');
698
  $html = wppa_select($slug, $opts, $vals);
699
- wppa_setting($slug, '14', $name, $desc, $html, $help, $clas, $tags);
700
 
701
  $name = __('Done?', 'wp-photo-album-plus');
702
  $desc = __('If you are ready answering these questions, select <b>yes</b>', 'wp-photo-album-plus');
@@ -2834,11 +2828,12 @@ global $wppa_supported_camara_brands;
2834
  $name = __('User name', 'wp-photo-album-plus');
2835
  $desc = __('Uploading users may overrule the default name.', 'wp-photo-album-plus');
2836
  $help = esc_js(__('If checked, the default photo name as defined in Table IX-D13 may be overruled by the user.', 'wp-photo-album-plus'));
2837
- $slug = 'wppa_name_user';
2838
- $html = wppa_checkbox($slug);
 
2839
  $clas = 'wppa_feup';
2840
  $tags = 'upload';
2841
- wppa_setting($slug, '7', $name, $desc, $html, $help, $clas, $tags);
2842
 
2843
  $name = __('Apply Newphoto desc user', 'wp-photo-album-plus');
2844
  $desc = __('Give each new frontend uploaded photo a standard description.', 'wp-photo-album-plus');
@@ -2853,8 +2848,9 @@ global $wppa_supported_camara_brands;
2853
  $name = __('User desc', 'wp-photo-album-plus');
2854
  $desc = __('Uploading users may overrule the default description.', 'wp-photo-album-plus');
2855
  $help = '';
2856
- $slug = 'wppa_desc_user';
2857
- $html = wppa_checkbox($slug);
 
2858
  $clas = 'wppa_feup';
2859
  $tags = 'upload';
2860
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
@@ -5220,7 +5216,7 @@ global $wppa_supported_camara_brands;
5220
  <td><?php _e('Link type', 'wp-photo-album-plus') ?></td>
5221
  <td><?php _e('Link page', 'wp-photo-album-plus') ?></td>
5222
  <td><?php _e('New tab', 'wp-photo-album-plus') ?></td>
5223
- <th scope="col" title="<?php _e('Photo specific link overrules', 'wp-photo-album-plus') ?>" style="cursor: default"><?php _e('PSO', 'wp-photo-album-plus') ?></td>
5224
  <td><?php _e('Help', 'wp-photo-album-plus') ?></td>
5225
  </tr>
5226
  </thead>
@@ -6283,7 +6279,7 @@ global $wppa_supported_camara_brands;
6283
  <td><?php _e('Link type', 'wp-photo-album-plus') ?></td>
6284
  <td><?php _e('Link page', 'wp-photo-album-plus') ?></td>
6285
  <td><?php _e('New tab', 'wp-photo-album-plus') ?></td>
6286
- <th scope="col" title="<?php _e('Photo specific link overrules', 'wp-photo-album-plus') ?>" style="cursor: default"><?php _e('PSO', 'wp-photo-album-plus') ?></td>
6287
  <td><?php _e('Help', 'wp-photo-album-plus') ?></td>
6288
  </tr>
6289
  </tfoot>
@@ -7080,7 +7076,7 @@ global $wppa_supported_camara_brands;
7080
 
7081
  wppa_setting_subheader('A', '4', __('Harmless and reverseable actions', 'wp-photo-album-plus'));
7082
 
7083
- $name = __('Ignore concurrency', 'wp-photo-album-plus');
7084
  $desc = __('Ignore the prevention of concurrent actions.', 'wp-photo-album-plus');
7085
  $help = esc_js(__('This setting is meant to recover from deadlock situations only. Use with care!', 'wp-photo-album-plus'));
7086
  $slug = 'wppa_maint_ignore_concurrency_error';
@@ -7092,7 +7088,7 @@ global $wppa_supported_camara_brands;
7092
  $clas = '';
7093
  $tags = 'system';
7094
  wppa_setting(false, '0.1', $name, $desc, $html, $help, $clas, $tags);
7095
-
7096
  $name = __('Postpone cron', 'wp-photo-album-plus');
7097
  $desc = __('Temporary do no background processes.', 'wp-photo-album-plus');
7098
  $help = esc_js(__('This setting is meant to be used a.o. during bulk import/upload. Use with care!', 'wp-photo-album-plus'));
@@ -7104,7 +7100,7 @@ global $wppa_supported_camara_brands;
7104
  $html = array($html1, $html2, $html3, $html4);
7105
  $clas = '';
7106
  $tags = 'system';
7107
- wppa_setting(false, '0.2', $name, $desc, $html, $help, $clas, $tags);
7108
 
7109
  $name = __('Setup', 'wp-photo-album-plus');
7110
  $desc = __('Re-initialize plugin.', 'wp-photo-album-plus');
@@ -9509,7 +9505,7 @@ global $wppa_supported_camara_brands;
9509
  $clas = '';
9510
  $tags = 'system,meta';
9511
  wppa_setting($slug, '8', $name, $desc, $html, $help, $clas, $tags);
9512
-
9513
  $name = __('Max EXIF tag array size', 'wp-photo-album-plus');
9514
  $desc = __('Truncate array tags to ...', 'wp-photo-album-plus');
9515
  $help = esc_js(__('A value of 0 disables this feature', 'wp-photo-album-plus'));
@@ -9518,7 +9514,7 @@ global $wppa_supported_camara_brands;
9518
  $clas = '';
9519
  $tags = 'system,meta';
9520
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
9521
-
9522
  $name = __('Import Create page', 'wp-photo-album-plus');
9523
  $desc = __('Create wp page that shows the album when a directory to album is imported.', 'wp-photo-album-plus');
9524
  $help = esc_js(__('As soon as an album is created when a directory is imported, a wp page is made that displays the album content.', 'wp-photo-album-plus'));
@@ -10232,7 +10228,7 @@ global $wppa_supported_camara_brands;
10232
 
10233
  $desc = '';
10234
  foreach ( $wppa_supported_camara_brands as $brand ) {
10235
- $lbl = wppa_exif_tagname( hexdec( '0x' . substr( $label['tag'], 2, 4 ) ), $brand, 'brandonly' );
10236
  if ( $lbl ) {
10237
  $desc .= '<br />' . $brand;
10238
  }
@@ -10244,7 +10240,7 @@ global $wppa_supported_camara_brands;
10244
 
10245
  $html1 = wppa_edit($slug1, $label['description']);
10246
  foreach ( $wppa_supported_camara_brands as $brand ) {
10247
- $lbl = wppa_exif_tagname( hexdec( '0x' . substr( $label['tag'], 2, 4 ) ), $brand, 'brandonly' );
10248
  if ( $lbl ) {
10249
  $html1 .= '<br /><span style="clear:left;float:left;" >' . $lbl . ':</span>';
10250
  }
@@ -10539,23 +10535,54 @@ function wppa_settings_box_header($id, $title) {
10539
  function wppa_setting_subheader($lbl, $col, $txt, $cls = '') {
10540
  global $wppa_subtable;
10541
  global $wppa_table;
 
10542
 
10543
  $wppa_subtable = $lbl;
10544
- $colspan = $col + 3;
 
10545
  echo '<tr class="'.$cls.'" style="background-color:#f0f0f0;" >'.
10546
  '<td style="color:#333;"><b>'.$lbl.'</b></td>'.
10547
- '<td title="Click to toggle subtable" onclick="wppaToggleSubTable(\''.$wppa_table.'\',\''.$wppa_subtable.'\');" colspan="'.$colspan.'" style="color:#333; cursor:pointer;" ><em><b>'.$txt.'</b></em></td>'.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10548
  '</tr>';
10549
  }
10550
 
10551
 
10552
- function wppa_setting( $slug, $num, $name, $desc, $html, $help, $cls = '', $tags = '-' ) {
10553
  global $wppa_status;
10554
  global $wppa_defaults;
10555
  global $wppa_table;
10556
  global $wppa_subtable;
10557
  global $no_default;
10558
  global $wppa_opt;
 
 
 
10559
 
10560
  if ( is_array($slug) ) $slugs = $slug;
10561
  else {
@@ -10567,13 +10594,13 @@ global $wppa_opt;
10567
  $htmls = false;
10568
  if ( $html ) $htmls[] = $html;
10569
  }
10570
- if ( strpos($num, ',') !== false ) {
10571
- $nums = explode(',', $num);
10572
  $nums[0] = substr($nums[0], 1);
10573
  }
10574
  else {
10575
  $nums = false;
10576
- if ( $num ) $nums[] = $num;
10577
  }
10578
 
10579
  // Convert tags to classes
@@ -10581,17 +10608,17 @@ global $wppa_opt;
10581
 
10582
  // Build the html
10583
  $result = "\n";
10584
- $result .= '<tr id="'.$wppa_table.$wppa_subtable.$num.'" class="wppa-'.$wppa_table.'-'.$wppa_subtable.' '.$cls.$tagcls.' wppa-none" style="color:#333;">';
10585
- $result .= '<td>'.$num.'</td>';
10586
  $result .= '<td>'.$name.'</td>';
10587
  $result .= '<td><small>'.$desc.'</small></td>';
10588
  if ( $htmls ) foreach ( $htmls as $html ) {
10589
  $result .= '<td>'.$html.'</td>';
10590
  }
10591
 
10592
- if ( $help || ( defined( 'WP_DEBUG') && WP_DEBUG ) ) {
10593
  $is_dflt = true;
10594
- $hlp = esc_js($name).':\n\n'.$help;
10595
  if ( ! $no_default ) {
10596
  if ( $slugs ) {
10597
  $hlp .= '\n\n'.__('The default for this setting is:', 'wp-photo-album-plus');
@@ -10611,7 +10638,20 @@ global $wppa_opt;
10611
  }
10612
  }
10613
  }
10614
- $result .= '<td><input type="button" style="font-size: 11px; height:20px; padding:0; cursor: pointer;" title="'.__('Click for help', 'wp-photo-album-plus').'" onclick="alert('."'".$hlp."'".')" value="&nbsp;' . ( $is_dflt ? '?' : '!' ) . '&nbsp;"></td>';
 
 
 
 
 
 
 
 
 
 
 
 
 
10615
  }
10616
  else {
10617
  $result .= '<td></td>';//$hlp = __('No help available');
@@ -10619,6 +10659,15 @@ global $wppa_opt;
10619
 
10620
  $result .= '</tr>';
10621
 
 
 
 
 
 
 
 
 
 
10622
  echo $result;
10623
 
10624
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.8.01
7
  *
8
  */
9
 
27
  global $wppa_supported_camara_brands;
28
 
29
  // Start test area
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  // End test area
32
 
438
  <input type="button" style="display:none;" class="wppa-quick" onclick="jQuery('.-wppa-quick').css('display','inline');jQuery('.wppa-quick').css('display','none')" value="<?php _e('Close quick setup', 'wp-photo-album-plus') ?>" />
439
  <?php } ?>
440
 
441
+ <input type="button"
442
+ style="float:right;"
443
+ value="<?php _e( 'Show all settings and helptext', 'wp-photo-album-plus' ) ?> "
444
+ class="button-secundary"
445
+ onclick="jQuery('.wppa-setting-help').css('display','');
446
+ jQuery( '.wppa-none' ).removeClass('wppa-none');
447
+ for( i=1;i<15;i++ ) { jQuery('#wppa_table_'+i).css('display', 'inline');}
448
+ jQuery( '.wppa-setting' ).css('display','');
449
+ jQuery( '.wppa-h' ).css( 'display', 'none' );
450
+ "
451
+ />
452
+
453
  <?php
454
  if ( get_option( 'wppa_prevrev' ) == '100' && get_option('wppa_i_done') != 'done' ) {
455
  ?>
690
  $opts = array('', __('yes', 'wp-photo-album-plus'), __('no', 'wp-photo-album-plus'));
691
  $vals = array('', 'yes', 'no');
692
  $html = wppa_select($slug, $opts, $vals);
693
+ wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
694
 
695
  $name = __('Done?', 'wp-photo-album-plus');
696
  $desc = __('If you are ready answering these questions, select <b>yes</b>', 'wp-photo-album-plus');
2828
  $name = __('User name', 'wp-photo-album-plus');
2829
  $desc = __('Uploading users may overrule the default name.', 'wp-photo-album-plus');
2830
  $help = esc_js(__('If checked, the default photo name as defined in Table IX-D13 may be overruled by the user.', 'wp-photo-album-plus'));
2831
+ $slug1 = 'wppa_name_user';
2832
+ $slug2 = 'wppa_name_user_mandatory';
2833
+ $html = wppa_checkbox( $slug1 ) . '<span style="float:left;" >' . __( 'Mandatory', 'wp-photo-album-plus' ) . ':</span>' . wppa_checkbox( $slug2 );
2834
  $clas = 'wppa_feup';
2835
  $tags = 'upload';
2836
+ wppa_setting($slug1, '7', $name, $desc, $html, $help, $clas, $tags);
2837
 
2838
  $name = __('Apply Newphoto desc user', 'wp-photo-album-plus');
2839
  $desc = __('Give each new frontend uploaded photo a standard description.', 'wp-photo-album-plus');
2848
  $name = __('User desc', 'wp-photo-album-plus');
2849
  $desc = __('Uploading users may overrule the default description.', 'wp-photo-album-plus');
2850
  $help = '';
2851
+ $slug1 = 'wppa_desc_user';
2852
+ $slug2 = 'wppa_desc_user_mandatory';
2853
+ $html = wppa_checkbox( $slug1 ) . '<span style="float:left;" >' . __( 'Mandatory', 'wp-photo-album-plus' ) . ':</span>' . wppa_checkbox( $slug2 );
2854
  $clas = 'wppa_feup';
2855
  $tags = 'upload';
2856
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
5216
  <td><?php _e('Link type', 'wp-photo-album-plus') ?></td>
5217
  <td><?php _e('Link page', 'wp-photo-album-plus') ?></td>
5218
  <td><?php _e('New tab', 'wp-photo-album-plus') ?></td>
5219
+ <td title="<?php _e('Photo specific link overrules', 'wp-photo-album-plus') ?>" style="cursor: pointer"><?php _e('PSO', 'wp-photo-album-plus') ?></td>
5220
  <td><?php _e('Help', 'wp-photo-album-plus') ?></td>
5221
  </tr>
5222
  </thead>
6279
  <td><?php _e('Link type', 'wp-photo-album-plus') ?></td>
6280
  <td><?php _e('Link page', 'wp-photo-album-plus') ?></td>
6281
  <td><?php _e('New tab', 'wp-photo-album-plus') ?></td>
6282
+ <td title="<?php _e('Photo specific link overrules', 'wp-photo-album-plus') ?>" style="cursor: pointer"><?php _e('PSO', 'wp-photo-album-plus') ?></td>
6283
  <td><?php _e('Help', 'wp-photo-album-plus') ?></td>
6284
  </tr>
6285
  </tfoot>
7076
 
7077
  wppa_setting_subheader('A', '4', __('Harmless and reverseable actions', 'wp-photo-album-plus'));
7078
 
7079
+ /* $name = __('Ignore concurrency', 'wp-photo-album-plus');
7080
  $desc = __('Ignore the prevention of concurrent actions.', 'wp-photo-album-plus');
7081
  $help = esc_js(__('This setting is meant to recover from deadlock situations only. Use with care!', 'wp-photo-album-plus'));
7082
  $slug = 'wppa_maint_ignore_concurrency_error';
7088
  $clas = '';
7089
  $tags = 'system';
7090
  wppa_setting(false, '0.1', $name, $desc, $html, $help, $clas, $tags);
7091
+ */
7092
  $name = __('Postpone cron', 'wp-photo-album-plus');
7093
  $desc = __('Temporary do no background processes.', 'wp-photo-album-plus');
7094
  $help = esc_js(__('This setting is meant to be used a.o. during bulk import/upload. Use with care!', 'wp-photo-album-plus'));
7100
  $html = array($html1, $html2, $html3, $html4);
7101
  $clas = '';
7102
  $tags = 'system';
7103
+ wppa_setting(false, '0', $name, $desc, $html, $help, $clas, $tags);
7104
 
7105
  $name = __('Setup', 'wp-photo-album-plus');
7106
  $desc = __('Re-initialize plugin.', 'wp-photo-album-plus');
9505
  $clas = '';
9506
  $tags = 'system,meta';
9507
  wppa_setting($slug, '8', $name, $desc, $html, $help, $clas, $tags);
9508
+ /*
9509
  $name = __('Max EXIF tag array size', 'wp-photo-album-plus');
9510
  $desc = __('Truncate array tags to ...', 'wp-photo-album-plus');
9511
  $help = esc_js(__('A value of 0 disables this feature', 'wp-photo-album-plus'));
9514
  $clas = '';
9515
  $tags = 'system,meta';
9516
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
9517
+ */
9518
  $name = __('Import Create page', 'wp-photo-album-plus');
9519
  $desc = __('Create wp page that shows the album when a directory to album is imported.', 'wp-photo-album-plus');
9520
  $help = esc_js(__('As soon as an album is created when a directory is imported, a wp page is made that displays the album content.', 'wp-photo-album-plus'));
10228
 
10229
  $desc = '';
10230
  foreach ( $wppa_supported_camara_brands as $brand ) {
10231
+ $lbl = wppa_exif_tagname( $label['tag'], $brand, 'brandonly' );
10232
  if ( $lbl ) {
10233
  $desc .= '<br />' . $brand;
10234
  }
10240
 
10241
  $html1 = wppa_edit($slug1, $label['description']);
10242
  foreach ( $wppa_supported_camara_brands as $brand ) {
10243
+ $lbl = wppa_exif_tagname( $label['tag'], $brand, 'brandonly' );
10244
  if ( $lbl ) {
10245
  $html1 .= '<br /><span style="clear:left;float:left;" >' . $lbl . ':</span>';
10246
  }
10535
  function wppa_setting_subheader($lbl, $col, $txt, $cls = '') {
10536
  global $wppa_subtable;
10537
  global $wppa_table;
10538
+ global $wppa_totcols;
10539
 
10540
  $wppa_subtable = $lbl;
10541
+ $colspan = $col + 2;
10542
+ $wppa_totcols = $col + 4;
10543
  echo '<tr class="'.$cls.'" style="background-color:#f0f0f0;" >'.
10544
  '<td style="color:#333;"><b>'.$lbl.'</b></td>'.
10545
+ '<td' .
10546
+ ' title="Click to toggle subtable"' .
10547
+ ' onclick="wppaToggleSubTable(\''.$wppa_table.'\',\''.$wppa_subtable.'\');"' .
10548
+ ' colspan="'.$colspan.'"' .
10549
+ ' style="color:#333; cursor:pointer;"' .
10550
+ ' >' .
10551
+ '<em>' .
10552
+ '<b>' .
10553
+ $txt .
10554
+ '</b>' .
10555
+ '</em>' .
10556
+ '</td>' .
10557
+ '<td>' .
10558
+ '<input' .
10559
+ ' type="button"' .
10560
+ ' class="wppa-' . $wppa_table . '-' . $wppa_subtable . ' wppa-' . $wppa_table . '-' . $wppa_subtable . '-h wppa-none' . ' wppa-h"' .
10561
+ ' style="font-size: 11px; height:20px; padding:0; cursor: pointer;"' .
10562
+ ' title="'.__('Click for help', 'wp-photo-album-plus').'"' .
10563
+ ' onclick="' .
10564
+ 'jQuery( \'.wppa-' . $wppa_table . '-' . $wppa_subtable . '\' ).css( \'display\', \'\' );' .
10565
+ 'jQuery( \'.wppa-' . $wppa_table . '-' . $wppa_subtable . '-help\' ).css( \'display\', \'\' );' .
10566
+ 'jQuery( this ).css( \'display\', \'none\' );' .
10567
+ 'jQuery( \'.wppa-' . $wppa_table . '-' . $wppa_subtable . '-h\' ).css( \'display\', \'none\' );' .
10568
+ '"' .
10569
+ ' value="&nbsp;?&nbsp;"' .
10570
+ ' />' .
10571
+ '</td>' .
10572
  '</tr>';
10573
  }
10574
 
10575
 
10576
+ function wppa_setting( $slug, $xnum, $name, $desc, $html, $help, $cls = '', $tags = '-' ) {
10577
  global $wppa_status;
10578
  global $wppa_defaults;
10579
  global $wppa_table;
10580
  global $wppa_subtable;
10581
  global $no_default;
10582
  global $wppa_opt;
10583
+ global $wppa_totcols;
10584
+
10585
+ $num = str_replace( array( ',', '.'), '', $xnum );
10586
 
10587
  if ( is_array($slug) ) $slugs = $slug;
10588
  else {
10594
  $htmls = false;
10595
  if ( $html ) $htmls[] = $html;
10596
  }
10597
+ if ( strpos($xnum, ',') !== false ) {
10598
+ $nums = explode(',', $xnum);
10599
  $nums[0] = substr($nums[0], 1);
10600
  }
10601
  else {
10602
  $nums = false;
10603
+ if ( $xnum ) $nums[] = $xnum;
10604
  }
10605
 
10606
  // Convert tags to classes
10608
 
10609
  // Build the html
10610
  $result = "\n";
10611
+ $result .= '<tr id="'.$wppa_table.$wppa_subtable.$num.'" class="wppa-setting wppa-'.$wppa_table.'-'.$wppa_subtable.' '.$cls.$tagcls.' wppa-none" style="color:#333;">';
10612
+ $result .= '<td>'.$xnum.'</td>';
10613
  $result .= '<td>'.$name.'</td>';
10614
  $result .= '<td><small>'.$desc.'</small></td>';
10615
  if ( $htmls ) foreach ( $htmls as $html ) {
10616
  $result .= '<td>'.$html.'</td>';
10617
  }
10618
 
10619
+ if ( $help ) { //|| ( defined( 'WP_DEBUG') && WP_DEBUG ) ) {
10620
  $is_dflt = true;
10621
+ $hlp = /* esc_js($name).':\n\n'. */ $help;
10622
  if ( ! $no_default ) {
10623
  if ( $slugs ) {
10624
  $hlp .= '\n\n'.__('The default for this setting is:', 'wp-photo-album-plus');
10638
  }
10639
  }
10640
  }
10641
+ $result .=
10642
+ '<td>' .
10643
+ '<input' .
10644
+ ' type="button"' .
10645
+ ' style="font-size: 11px; height:20px; padding:0; cursor: pointer;"' .
10646
+ ' class="wppa-h wppa-' . $wppa_table . '-' . $wppa_subtable . '-h"' .
10647
+ ' title="'.__('Click for help', 'wp-photo-album-plus').'"' .
10648
+ ' onclick="' .
10649
+ 'jQuery( \'#' . $wppa_table.$wppa_subtable.$num.'-help\' ).css(\'display\',\'\');' .
10650
+ 'jQuery( this ).css( \'display\', \'none\' );' .
10651
+ '"' .
10652
+ ' value="&nbsp;' . ( $is_dflt ? '?' : '!' ) . '&nbsp;"' .
10653
+ ' />' .
10654
+ '</td>';
10655
  }
10656
  else {
10657
  $result .= '<td></td>';//$hlp = __('No help available');
10659
 
10660
  $result .= '</tr>';
10661
 
10662
+ if ( $help ) {
10663
+ $result .=
10664
+ '<tr id="'.$wppa_table.$wppa_subtable.$num.'-help" class="wppa-setting-help wppa-'.$wppa_table.'-'.$wppa_subtable.'-help " style="display:none;" >' .
10665
+ '<td></td>' . // num
10666
+ '<td></td>' . // name
10667
+ '<td colspan="' . ( $wppa_totcols - 2 ) . '" style="color:#000077;" ><small><i>' . stripslashes( str_replace( '\n', ' ', $hlp ) ) . '</i></small></td>' .
10668
+ '</tr>';
10669
+ }
10670
+
10671
  echo $result;
10672
 
10673
  }
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -561,7 +561,20 @@ global $silent;
561
  delete_option( 'wppa_' . WPPA_EXIF . '_lastkey' );
562
  delete_option( 'wppa_' . WPPA_INDEX . '_lastkey' );
563
 
564
- wppa_schedule_maintenance_proc( 'wppa_format_exif' );
 
 
 
 
 
 
 
 
 
 
 
 
 
565
  }
566
  }
567
 
@@ -985,8 +998,10 @@ Hide Camera info
985
  'wppa_copyright_notice' => __('<span style="color:red" >Warning: Do not upload copyrighted material!</span>', 'wp-photo-album-plus'), // 20
986
  'wppa_watermark_user' => 'no',
987
  'wppa_name_user' => 'yes',
 
988
  'wppa_apply_newphoto_desc_user' => 'no',
989
  'wppa_desc_user' => 'yes',
 
990
  'wppa_fe_custom_fields' => 'no',
991
  'wppa_fe_upload_tags' => 'no',
992
  'wppa_up_tagselbox_on_1' => 'yes', // 18
@@ -1477,7 +1492,7 @@ Hide Camera info
1477
 
1478
  // Table VIII: Actions
1479
  // A Harmless
1480
- 'wppa_maint_ignore_concurrency_error' => 'no', // 0.1
1481
  'wppa_maint_ignore_cron' => 'no', // 0.2
1482
  'wppa_setup' => '', // 1
1483
  'wppa_backup' => '',
@@ -1718,7 +1733,7 @@ Hide Camera info
1718
  'wppa_remake_add' => 'yes',
1719
  'wppa_save_iptc' => 'yes',
1720
  'wppa_save_exif' => 'yes',
1721
- 'wppa_exif_max_array_size' => '10',
1722
  'wppa_chgsrc_is_restricted' => 'no',
1723
  'wppa_ext_status_restricted' => 'no',
1724
  'wppa_desc_is_restricted' => 'no',
@@ -2028,9 +2043,12 @@ static $user;
2028
  }
2029
  }
2030
 
 
2031
  if ( ! $owner ) {
2032
  $owner = wppa_get_user( 'login' ); // The current users login name
2033
  }
 
 
2034
  if ( ! is_array( $my_albs_parents ) ) {
2035
  $query = $wpdb->prepare( "SELECT DISTINCT `a_parent` FROM `" . WPPA_ALBUMS . "` WHERE `owner` = %s", $owner );
2036
  $my_albs_parents = $wpdb->get_col( $query );
@@ -2038,8 +2056,10 @@ static $user;
2038
  $my_albs_parents = array();
2039
  }
2040
  }
 
 
2041
  if ( ! $user ) {
2042
- $user = wppa_get_user( wppa_opt( 'grant_name' ) ); // The current users name as how the album should be named
2043
  }
2044
 
2045
  // If a parent is given and it is not a grant parent, quit
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.8.01
7
  *
8
  */
9
 
561
  delete_option( 'wppa_' . WPPA_EXIF . '_lastkey' );
562
  delete_option( 'wppa_' . WPPA_INDEX . '_lastkey' );
563
 
564
+ // wppa_schedule_maintenance_proc( 'wppa_format_exif' );
565
+ }
566
+
567
+ // Fix exiflables that were undefined so far but have a known description by now
568
+ if ( $old_rev <= '6801' ) {
569
+ $exif_labels = $wpdb->get_results( "SELECT * FROM `" . WPPA_EXIF . "` WHERE `photo` = 0 AND `description` LIKE 'UndefinedTag%'", ARRAY_A );
570
+ if ( ! empty( $exif_labels ) ) foreach( $exif_labels as $label ) {
571
+ $newdesc = wppa_exif_tagname( $label['tag'] );
572
+ if ( $newdesc != $label['description'] ) {
573
+ $wpdb->query( $wpdb->prepare( "UPDATE `" . WPPA_EXIF . "` SET `description` = %s WHERE `photo` = 0 AND `tag` = %s", $newdesc, $label['tag'] ) );
574
+ wppa_log( 'obs', 'There is a new desc for '.$label['tag'].' being: '.$newdesc );
575
+ }
576
+ }
577
+ wppa_schedule_maintenance_proc( 'wppa_recup' );
578
  }
579
  }
580
 
998
  'wppa_copyright_notice' => __('<span style="color:red" >Warning: Do not upload copyrighted material!</span>', 'wp-photo-album-plus'), // 20
999
  'wppa_watermark_user' => 'no',
1000
  'wppa_name_user' => 'yes',
1001
+ 'wppa_name_user_mandatory' => 'no',
1002
  'wppa_apply_newphoto_desc_user' => 'no',
1003
  'wppa_desc_user' => 'yes',
1004
+ 'wppa_desc_user_mandatory' => 'no',
1005
  'wppa_fe_custom_fields' => 'no',
1006
  'wppa_fe_upload_tags' => 'no',
1007
  'wppa_up_tagselbox_on_1' => 'yes', // 18
1492
 
1493
  // Table VIII: Actions
1494
  // A Harmless
1495
+ // 'wppa_maint_ignore_concurrency_error' => 'no', // 0.1
1496
  'wppa_maint_ignore_cron' => 'no', // 0.2
1497
  'wppa_setup' => '', // 1
1498
  'wppa_backup' => '',
1733
  'wppa_remake_add' => 'yes',
1734
  'wppa_save_iptc' => 'yes',
1735
  'wppa_save_exif' => 'yes',
1736
+ // 'wppa_exif_max_array_size' => '10',
1737
  'wppa_chgsrc_is_restricted' => 'no',
1738
  'wppa_ext_status_restricted' => 'no',
1739
  'wppa_desc_is_restricted' => 'no',
2043
  }
2044
  }
2045
 
2046
+ // Retrieve the users login name if not done already
2047
  if ( ! $owner ) {
2048
  $owner = wppa_get_user( 'login' ); // The current users login name
2049
  }
2050
+
2051
+ // Get all the parents of the current user albums if not done already
2052
  if ( ! is_array( $my_albs_parents ) ) {
2053
  $query = $wpdb->prepare( "SELECT DISTINCT `a_parent` FROM `" . WPPA_ALBUMS . "` WHERE `owner` = %s", $owner );
2054
  $my_albs_parents = $wpdb->get_col( $query );
2056
  $my_albs_parents = array();
2057
  }
2058
  }
2059
+
2060
+ // Get the current users name as how the album should be named
2061
  if ( ! $user ) {
2062
+ $user = wppa_get_user( wppa_opt( 'grant_name' ) );
2063
  }
2064
 
2065
  // If a parent is given and it is not a grant parent, quit
wppa-styles.php CHANGED
@@ -3,7 +3,7 @@
3
  /* Package: wp-photo-album-plus
4
  /*
5
  /* Various style computation routines
6
- /* Version 6.7.02
7
  /*
8
  */
9
 
@@ -30,8 +30,6 @@ global $wppa_dynamic_css_data;
30
  : '' ) . '
31
  ' . ( wppa_opt( 'bradius' ) > '0' ?
32
  'border-radius:' . wppa_opt( 'bradius' ) . 'px; -moz-border-radius:' .
33
- wppa_opt( 'bradius' ) . 'px; -khtml-border-radius:' .
34
- wppa_opt( 'bradius' ) . 'px; -webkit-border-radius:' .
35
  wppa_opt( 'bradius' ) . 'px; ' :
36
  '' ) . '
37
  ' . ( wppa_opt( 'box_spacing' ) ?
@@ -45,11 +43,7 @@ global $wppa_dynamic_css_data;
45
  'border-style: solid; border-width:' . floor( ( wppa_opt( 'bwidth' ) + 2 ) / 3 ) . 'px; ' :
46
  '' ) . '
47
  ' . ( wppa_opt( 'bradius' ) > '0' ?
48
- 'border-radius:' . floor( ( wppa_opt( 'bradius' ) + 2 ) / 3 ) . 'px; -moz-border-radius:' .
49
- floor( ( wppa_opt( 'bradius' ) + 2 ) / 3 ) . 'px; -khtml-border-radius:' .
50
- floor( ( wppa_opt( 'bradius' ) + 2 ) / 3 ) . 'px; -webkit-border-radius:' .
51
- floor( ( wppa_opt( 'bradius' ) + 2 ) / 3 ) . 'px; ' :
52
- '' ) . '
53
  }';
54
 
55
  $content .= '
@@ -709,9 +703,6 @@ function wppa_wcs( $class ) {
709
  $opt = wppa_opt( 'bradius' );
710
  if ( $opt > '0' ) {
711
  $result .= 'border-radius:' . $opt . 'px; ';
712
- $result .= '-moz-border-radius:' . $opt . 'px; ';
713
- $result .= '-khtml-border-radius:' . $opt . 'px; ';
714
- $result .= '-webkit-border-radius:' . $opt . 'px; ';
715
  }
716
  $opt = wppa_opt( 'box_spacing' );
717
  if ( $opt != '' ) {
@@ -728,9 +719,6 @@ function wppa_wcs( $class ) {
728
  if ( $opt > '0' ) {
729
  $opt = floor( ( $opt + 2 ) / 3 );
730
  $result .= 'border-radius:' . $opt . 'px; ';
731
- $result .= '-moz-border-radius:' . $opt . 'px; ';
732
- $result .= '-khtml-border-radius:' . $opt . 'px; ';
733
- $result .= '-webkit-border-radius:' . $opt . 'px; ';
734
  }
735
  break;
736
  case 'wppa-cover-box':
3
  /* Package: wp-photo-album-plus
4
  /*
5
  /* Various style computation routines
6
+ /* Version 6.8.01
7
  /*
8
  */
9
 
30
  : '' ) . '
31
  ' . ( wppa_opt( 'bradius' ) > '0' ?
32
  'border-radius:' . wppa_opt( 'bradius' ) . 'px; -moz-border-radius:' .
 
 
33
  wppa_opt( 'bradius' ) . 'px; ' :
34
  '' ) . '
35
  ' . ( wppa_opt( 'box_spacing' ) ?
43
  'border-style: solid; border-width:' . floor( ( wppa_opt( 'bwidth' ) + 2 ) / 3 ) . 'px; ' :
44
  '' ) . '
45
  ' . ( wppa_opt( 'bradius' ) > '0' ?
46
+ 'border-radius:' . floor( ( wppa_opt( 'bradius' ) + 2 ) / 3 ) . 'px; ' : '' ) . '
 
 
 
 
47
  }';
48
 
49
  $content .= '
703
  $opt = wppa_opt( 'bradius' );
704
  if ( $opt > '0' ) {
705
  $result .= 'border-radius:' . $opt . 'px; ';
 
 
 
706
  }
707
  $opt = wppa_opt( 'box_spacing' );
708
  if ( $opt != '' ) {
719
  if ( $opt > '0' ) {
720
  $opt = floor( ( $opt + 2 ) / 3 );
721
  $result .= 'border-radius:' . $opt . 'px; ';
 
 
 
722
  }
723
  break;
724
  case 'wppa-cover-box':
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.7.09
7
  *
8
  */
9
 
@@ -2234,6 +2234,7 @@ global $wpdb;
2234
  $data[$key]['totvalue'] += $rating['value'];
2235
  }
2236
  }
 
2237
  foreach ( array_keys( $data ) as $key ) {
2238
  $thumb = wppa_cache_thumb( $key );
2239
  $data[$key]['meanrating'] = $data[$key]['totvalue'] / $data[$key]['ratingcount'];
@@ -2954,7 +2955,7 @@ function wppa_sanitize_text( $txt ) {
2954
  }
2955
 
2956
  function wppa_is_mobile() {
2957
- //return true; // debug
2958
  $result = false;
2959
  $detect = new wppa_mobile_detect();
2960
  if ( $detect->isMobile() ) {
@@ -2963,6 +2964,16 @@ function wppa_is_mobile() {
2963
  return $result;
2964
  }
2965
 
 
 
 
 
 
 
 
 
 
 
2966
  // Like wp_nonce_field
2967
  // To prevent duplicate id's, we externally add an id number ( e.g. album ) and internally the mocc number.
2968
  function wppa_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true, $wppa_id = '0' ) {
@@ -4148,5 +4159,44 @@ function wppa_parse_args( $args, $defaults ) {
4148
  }
4149
 
4150
  function wppa_is_divisible( $t, $n ) {
4151
- return ( round( $t / $n ) == ( $t / $n ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4152
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.8.01
7
  *
8
  */
9
 
2234
  $data[$key]['totvalue'] += $rating['value'];
2235
  }
2236
  }
2237
+
2238
  foreach ( array_keys( $data ) as $key ) {
2239
  $thumb = wppa_cache_thumb( $key );
2240
  $data[$key]['meanrating'] = $data[$key]['totvalue'] / $data[$key]['ratingcount'];
2955
  }
2956
 
2957
  function wppa_is_mobile() {
2958
+ // return true; // debug
2959
  $result = false;
2960
  $detect = new wppa_mobile_detect();
2961
  if ( $detect->isMobile() ) {
2964
  return $result;
2965
  }
2966
 
2967
+ function wppa_is_iphoneoripad() {
2968
+ // return true; // debug
2969
+ $result = false;
2970
+ $detect = new wppa_mobile_detect();
2971
+ if ( $detect->isDevice( 'iphone' ) || $detect->isDevice( 'ipad' ) ) {
2972
+ $result = true;
2973
+ }
2974
+ return $result;
2975
+ }
2976
+
2977
  // Like wp_nonce_field
2978
  // To prevent duplicate id's, we externally add an id number ( e.g. album ) and internally the mocc number.
2979
  function wppa_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true, $wppa_id = '0' ) {
4159
  }
4160
 
4161
  function wppa_is_divisible( $t, $n ) {
4162
+
4163
+ if ( ! is_numeric( $t ) || ! is_numeric( $n ) ) {
4164
+ return false;
4165
+ }
4166
+ else {
4167
+ return ( round( $t / $n ) == ( $t / $n ) );
4168
+ }
4169
+ }
4170
+
4171
+ function wppa_dump( $txt = '' ) {
4172
+
4173
+ // Init
4174
+ $file = WPPA_PATH . '/wppa-dump.txt';
4175
+
4176
+ // Clear
4177
+ if ( ! $txt && file_exists( $file ) ) {
4178
+ unlink( $file );
4179
+ }
4180
+
4181
+ // Open file
4182
+ if ( file_exists( $file ) ) {
4183
+ $mode = 'ab';
4184
+ }
4185
+ else {
4186
+ $mode = 'wb';
4187
+ }
4188
+ $handle = fopen( $file, $mode );
4189
+
4190
+ // Write
4191
+ if ( $handle ) {
4192
+ if ( is_array( $txt ) ) {
4193
+ $txt = var_export( $txt, true );
4194
+ }
4195
+ fwrite( $handle, $txt . "\n" );
4196
+ fclose( $handle );
4197
+ }
4198
+ }
4199
+
4200
+ function wppa_is_pdf( $id ) {
4201
+ return ( strtolower( wppa_get_ext( wppa_get_photo_item( $id, 'filename' ) ) ) == 'pdf' );
4202
  }
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 6.8.00
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 = '6800'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-8-00-012'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 6.8.01.011
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 = '6801'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-8-01-011'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );