Author Topic: how do I get rid of the metric?  (Read 2134 times)

0 Members and 1 Guest are viewing this topic.

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
how do I get rid of the metric?
« on: August 06, 2016, 12:16:36 AM »
http://www.desmoinesweather.org/weather28/index.php?p=my%20_bloomsky_page&lang=en#data-area

I got this far with the Leuven template.   I am happy with what I have, I suspect some tweaking information is available somewhere .   What I need to know is how to not display the metric values.   I thought I changed them in the script, but I  might have missed something.


Offline SpringHillWeather

  • Weather Hobbyist
  • Forecaster
  • *****
  • Posts: 533
  • Spring Hill, Florida
    • Spring Hill
Re: how do I get rid of the metric?
« Reply #1 on: August 06, 2016, 12:36:08 AM »
http://www.desmoinesweather.org/weather28/index.php?p=my%20_bloomsky_page&lang=en#data-area

I got this far with the Leuven template.   I am happy with what I have, I suspect some tweaking information is available somewhere .   What I need to know is how to not display the metric values.   I thought I changed them in the script, but I  might have missed something.

In the ws_bloomsky.php file you need to change these settings.
Code: [Select]

#$bl_intl_units  = true;         // for non-us display of data
$bl_intl_units  = false;       // remove # when using imperial units
Saratoga
HomeWeatherStation
Meteotemplate
Homebrew
Ambient 1001 | ObserverIP | Meteobridge | MeteoPlug

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: how do I get rid of the metric?
« Reply #2 on: August 06, 2016, 12:49:22 AM »
I have that already set that way.  I wonder if it is a setting on their site?  my iphone ap is in US units,  so is the online site.   

Offline SpringHillWeather

  • Weather Hobbyist
  • Forecaster
  • *****
  • Posts: 533
  • Spring Hill, Florida
    • Spring Hill
Re: how do I get rid of the metric?
« Reply #3 on: August 06, 2016, 01:01:24 AM »
I have that already set that way.  I wonder if it is a setting on their site?  my iphone ap is in US units,  so is the online site.

I checked and the only other thing I see is on the http://dashboard.bloomsky.com site there is a toggle between C and F on the timelapse screen.

All mine do show US units so its possible.
Saratoga
HomeWeatherStation
Meteotemplate
Homebrew
Ambient 1001 | ObserverIP | Meteobridge | MeteoPlug

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: how do I get rid of the metric?
« Reply #4 on: August 06, 2016, 01:13:28 AM »
it has to be something else, I have that set as well?

Offline SpringHillWeather

  • Weather Hobbyist
  • Forecaster
  • *****
  • Posts: 533
  • Spring Hill, Florida
    • Spring Hill
Re: how do I get rid of the metric?
« Reply #5 on: August 06, 2016, 01:59:29 AM »
it has to be something else, I have that set as well?

I just tried on my site.  The ws_bloomsky file is located in _my_scripts folder, not sure if that matters along with the bundled files.

When I use these setting its switches to metric units:

#$bl_intl_units  = true;         // for non-us display of data
$bl_intl_units  = true;       // remove # when using imperial units


When I use these setting is switches back to US units

#$bl_intl_units  = true;         // for non-us display of data
$bl_intl_units  = false;       // remove # when using imperial units
« Last Edit: August 06, 2016, 02:01:23 AM by StatenIslandWeather »
Saratoga
HomeWeatherStation
Meteotemplate
Homebrew
Ambient 1001 | ObserverIP | Meteobridge | MeteoPlug

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: how do I get rid of the metric?
« Reply #6 on: August 06, 2016, 03:29:37 AM »
it has to be something else, I have that set as well?
Good morning,
Your menu file specifies:
Code: [Select]
<item nr="my _bloomsky_page" caption="Bloomsky Station" link="_my_scripts/my_bloomsky_page.php"/>The full-page script in your menu:
http://www.desmoinesweather.org/weather28/_my_scripts/my_bloomsky_page.php?sce=view
At line 42 in this script the bloomsky horizontal component is included:
Code: [Select]
include '_my_scripts/ws_bloomsky.php';
# or use the other one
#include '_my_scripts/ws_bloomsky_v.php';
So this is the script which is displaying the images and values
http://www.desmoinesweather.org/weather28/_my_scripts/ws_bloomsky.php?sce=view which has this as the first few lines:
Code: [Select]
<?php
#-----------------------------------------------------------------------
# settings:  most of them copied from your settings file
#-----------------------------------------------------------------------
$bl_api_key     'w-DApc_oebTbY9CowA=='# 'w-DApc_oebTbY9CowA==';   // obtained from your bloomsky dashboard => click "Developers" at the left bottom
#
$bl_intl_units  true;         // for non-us display of data
#$bl_intl_units  = false;       // remove # when using imperial units

So you are using international (C,hpa)  units as you set the second line to comment. 
Remove that # to set that line operational.

In the WiKi you find some hints about adapting scripts and the meaning of the #
http://leuven-template.eu/dokuwiki28/doku.php?id=en:php#what_does_that_do

Wim


Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: how do I get rid of the metric?
« Reply #7 on: August 06, 2016, 08:26:37 AM »
This is the section that I just copied .  are things set correctly?

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: how do I get rid of the metric?
« Reply #8 on: August 06, 2016, 10:28:48 AM »
This is the section that I just copied .  are things set correctly?
No,
You should set the instruction for international units (=C and hPa) to false.
The second line should therefor read:
Code: [Select]
$bl_intl_units  = false;
And please DO NOT add a # on the first position.   With a # everything after it is a comment and not processed.

Wim
« Last Edit: August 06, 2016, 10:40:40 AM by wvdkuil »

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: how do I get rid of the metric?
« Reply #9 on: August 06, 2016, 12:09:47 PM »
This is the section that I just copied .  are things set correctly?
No,
You should set the instruction for international units (=C and hPa) to false.
The second line should therefor read:
Code: [Select]
$bl_intl_units  = false;
And please DO NOT add a # on the first position.   With a # everything after it is a comment and not processed.

Wim

That did it.   Thank you.