Page 1 of 1
Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 1:26 pm
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?
Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 2:38 pm
by jmcmurry
Can you post a link to an example?
- Jim
Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 3:05 pm
by youngros
Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 3:44 pm
by ikarus1969
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:
If you want to use metric units you have to code
Does this help?
(
Edit: for a short list of the currently available variables you can have a look to
this post)
Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 4:58 pm
by youngros
Still showing in Faherenheit
Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 6:20 pm
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

Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 6:57 pm
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 =
'¤t_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>
Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 7:46 pm
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 =
'¤t_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

)
Re: Temperature showing in F instead of C
Posted: Wed Jan 27, 2010 9:21 pm
by Meerkat
youngros,
You have specified: yowindow-xml
instead of: yowindow.xml