Temperature showing in F instead of C

Post Reply
youngros

Temperature showing in F instead of C

Post by youngros »

I have the Yo Window working, but but for some reason the temperature, pressure and wind are showing in imperial where the rest of my site is metric. Andy ideas how to fix this please?
jmcmurry
Posts: 368
Joined: Tue Oct 13, 2009 11:09 am
Name: Jim
Location: Mauston, WI, USA
Contact:

Re: Temperature showing in F instead of C

Post by jmcmurry »

Can you post a link to an example?

- Jim
youngros

Re: Temperature showing in F instead of C

Post by youngros »

ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Temperature showing in F instead of C

Post by ikarus1969 »

youngros wrote:sorry forgot to put it on

http://www.sanssouciwebdesign.com/weath ... recast.php

Rosalind
Hi rosalind!

You have to change one parameter in the code of the YoWindow-Widget in your website:

One parameter to the YoWindow-object is called "flashvars". One part (say "variable") of this parameter is called "unit_system" .

Currently you have coded:

Code: Select all

unit_system=us
If you want to use metric units you have to code

Code: Select all

unit_system=metric
Does this help?

(Edit: for a short list of the currently available variables you can have a look to this post)
»Man is impressive. In a universe full of untold secrets he has invented boredom.«
youngros

Re: Temperature showing in F instead of C

Post by youngros »

Still showing in Faherenheit
ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Temperature showing in F instead of C

Post by ikarus1969 »

Try to avoid hard breaks within the value-String of flashvars-parameter. I tried it in both Firefox and IE8 without the hard breaks and it works.

What i mean: don't write "...unit" in one line and "_system...." in the following line.

And by the way: why not using the provided path "http://swf.yowindow.com/wimo/hpPal/hpPal.swf" instead of saving the flash locally? If there are any changes, you would always get the newest version.
But that's another question ;)
»Man is impressive. In a universe full of untold secrets he has invented boredom.«
youngros

Re: Temperature showing in F instead of C

Post by youngros »

into Celsius now thanks

comes of copying and pasting the code and line breaks appearing where they weren't originally.

at the moment it is showing the forecast from yrno rather than what is happening on my station, this is the code that I am using

$yomini_home =
'&current_weather_url=http://www.sanssouciwebdesign.com/weath ... ntBar=truu';
$yomini_nothome =
'&unit_system=metric&background=#FFFFFF&mini_temperature=true&mini_time=true&mini_locationBar=true&mini_momentBar=true';

$default = 0; // Default forecast to show if no choosed
$WantPulldown = 0; // Do you want the pulldown? If not is default forecast shown

$yo_geo = array(
'2267827'.$yomini_home,
'nnnnnnn'.$yomini_nothome,

);
// CONFIG END
//**********************************************

// ***** DYNAMIC YOWINDOW *****
if (!empty($_GET[tl])) {$geo_number = $_GET[tl];} else {$geo_number =
$default;}
?>
<object type="application/x-shockwave-flash"
data="http://repkasoft.com/wimo/hpPal/hpPal.swf" width="661"
height="248">
<param name="movie"
value="http://repkasoft.com/wimo/hpPal/hpPal.swf"/>
<param name="allowfullscreen" value="true"/>
<param name="wmode" value="opaque"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="flashvars" value="location_id=gn:<?php echo $yo_geo
[$geo_number];?> "/>
The beautiful weather monitor requires the free Adoble Flash Player
which you can <a href="http://get.adobe.com/flashplayer/">download here
</a>.
</object>
ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Temperature showing in F instead of C

Post by ikarus1969 »

youngros wrote:at the moment it is showing the forecast from yrno rather than what is happening on my station, this is the code that I am using

$yomini_home =
'&current_weather_url=http://www.sanssouciwebdesign.com/weath ... ntBar=truu';
$yomini_nothome =
'&unit_system=metric&background=#FFFFFF&mini_temperature=true&mini_time=true&mini_locationBar=true&mini_momentBar=true';

$default = 0; // Default forecast to show if no choosed
$WantPulldown = 0; // Do you want the pulldown? If not is default forecast shown

$yo_geo = array(
'2267827'.$yomini_home,
'nnnnnnn'.$yomini_nothome,

);
// CONFIG END
//**********************************************

// ***** DYNAMIC YOWINDOW *****
if (!empty($_GET[tl])) {$geo_number = $_GET[tl];} else {$geo_number =
$default;}
?>
<object type="application/x-shockwave-flash"
data="http://repkasoft.com/wimo/hpPal/hpPal.swf" width="661"
height="248">
<param name="movie"
value="http://repkasoft.com/wimo/hpPal/hpPal.swf"/>
<param name="allowfullscreen" value="true"/>
<param name="wmode" value="opaque"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="flashvars" value="location_id=gn:<?php echo $yo_geo
[$geo_number];?> "/>
The beautiful weather monitor requires the free Adoble Flash Player
which you can <a href="http://get.adobe.com/flashplayer/">download here
</a>.
</object>
I suppose the content of the field "tl" is something not equal to zero (but i'm not a php-crack :) )
»Man is impressive. In a universe full of untold secrets he has invented boredom.«
User avatar
Meerkat
Posts: 65
Joined: Thu Jan 21, 2010 4:19 pm
Name: Rainer
Location: Pretoria, South Africa
Contact:

Re: Temperature showing in F instead of C

Post by Meerkat »

youngros,
You have specified: yowindow-xml
instead of: yowindow.xml
Post Reply