Author Topic: I give up... :-)  (Read 266 times)

0 Members and 1 Guest are viewing this topic.

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3071
  • SCCA EM #156
    • North Georgia and US Weather
I give up... :-)
« on: August 31, 2017, 12:57:56 PM »
I'm working on Ken's template so that I can use it at several schools I'm supporting, and I'm trying to figure out where the default setting is for "uom", the one that sets IMPERIAL or METRIC. My eyes are now crossed after looking so long. :-)

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 3992
Re: I give up... :-)
« Reply #1 on: August 31, 2017, 01:18:10 PM »
Did you look at Settings.php line 144

Code: [Select]
$SITE['uomTemp'] = '°F';  // ='°C', ='°F'
$SITE['uomBaro'] = ' inHg';    // =' hPa', =' mb', =' inHg'
$SITE['uomWind'] = ' mph';   // =' km/h', =' kts', =' m/s', =' mph'
$SITE['uomRain'] = ' in';     // =' mm', =' in'
$SITE['uomSnow'] = ' in';     // =' cm', =' in'
$SITE['uomDistance'] = ' miles';  // or ' km' -- used for Wind Run display
$SITE['uomPerHour'] = '/hr';
//
Randy, the Aviator is my father in 1963 with his Indian bike

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3071
  • SCCA EM #156
    • North Georgia and US Weather
Re: I give up... :-)
« Reply #2 on: August 31, 2017, 01:38:48 PM »
All of that is set correctly for IMPERIAL. I can click on IMPERIAL and it all changes from metric to US, I just can't find the global setting to make it come up as IMPERIAL as the default.
« Last Edit: August 31, 2017, 01:40:51 PM by DaculaWeather »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6150
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: I give up... :-)
« Reply #3 on: August 31, 2017, 03:27:12 PM »
The template (PHP parts) expect to work in only ONE system (Metric or Imperial) and the Settings.php entries reflect that.  The PHP part of the template does not convert from one to another system.  It expects the tags php file to use the units specified in Settings.php for the weather software.

If you use the Alternative Dashboard from Burnsville, it is the ajaxWDwx3.js JavaScript that performs the automatic swap from Metric to Imperial. 
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3071
  • SCCA EM #156
    • North Georgia and US Weather
Re: I give up... :-)
« Reply #4 on: August 31, 2017, 04:40:19 PM »
That's what I needed! I found it in the ajaxWDwx3.js file. Thanks Ken! Awesome as always!