Weather by You!
Templates and Projects support => Php templates => Topic started by: Vern on October 30, 2012, 10:09:12 AM
-
I looked every where in all the files and changed what i thought i needed to but guess not, on forecast page still showing in C not F
-
Hi Vern,
To select Fahrenheit, simply edit file WU-forecast.php, and at line #173,
You're supposed to find this line:
$showTempsAs = 'C'; // under icons, 'C'=Centigrade only, 'F'=Fahrenheit only, 'B' = both
Then, as indicated, simply change letter 'C' for 'F' and things will be great!
Hope you'll send a link to your template! ;D
Best regards,
Jacques
-
Done that and does not change
-
i'm having the same problem. I have even changed the C to an F then tried changing it to a B. Still get the forecast in metric units. My weather station is not connected so that the other pages are not being updated, but I didn't think that should affect the forecast page. I am trying to get things working before I make it live. The URL for my weather site is nrrwx. navajoranch.com. The WU-forecast.php file is located at nrrwx.navajoranch.com/include/WU-forecast.php.
Any help would be greatly appreciated.
edkelly
-
Hi Ed,
When I see your page, I see (C) on all degrees!
You have edited WU-Forecast.php rightly, around line #125
you've changed WU address to point to your location...
When you visit that link, is it in Celcius??
Also, in the same file, you have around line #173: $showTempsAs = 'C';
You could have 3 differenc choices, (C)elcius, (F)arenheight or (B)oth, try them
to see if bumbers are changing!
Regards,
Jacques
-
Hi Jacques,
I set up a site for my son for Aztec, NM that is live. it is at http://aztecwx.navajoranch.com, and it is doing the same thing.
I copied the link from his WU-forecast.php file that I had changed to point to WU for Aztec and then pasted it in my browser and it shows the WU forecast for Aztec, NM and it is in F.
I did try 'F' and then tried 'B' in the #173 line which is now
$showTempsAs = 'B'; // under icons, 'C'=Centigrade only, 'F'=Fahrenheit only, 'B' = both
The numbers on the forecast page did not change with either the 'F' for the 'B'
It still shows the temperature numbers for C and the wind in km/h
and I just tried using " instead of ' and that did not make a difference either.
Thank you for your help, I hope that you have some other suggestion that I could try.
I would be willing to attach the WU-forecast.php file if it would help.
Debs Kelly
-
Hi Ed,
I think I'll have to take some time to experience it!
I have to admit that I'm in Canada and don't really use these.
I'm working with Canada Government Forecast.. then I've just
take Saratoga's script and merge it in my templates to give
already merged forecast page!
Maybe if you're in a rush, contact Ken (SaratogaWX) on
Cumulus forum, or on his own website! (http://saratoga-weather.org)
Regards,
Jacques
-
Hi Jacques,
I don't know enough about php to make the WU script to display Imperial units, so I modified the forecast_WU.php file to make a forecast_adv.php file that uses the advforecast2.php script from SaratogaWX NWS scripts. I also changed the graphic in the lower left from Weather Underground to a nwsright.jpg from the NWS forecast site. I also added to the header_menu.php file to add the forecasted.php page. I also used the forecast images from SaratogaWX in the root of my weather site.
You can take a look at http://aztecwx.navajoranch.com
I'll also attach the modified files.
Debs Kelly
-
Hi Debs,
That is a pretty good adaptation for Weather Blues! 8)
Thanks to take time to share it with all others!
Nice to keep Ken's copyright (SaratogaWX)
Weather Blues will begin to be a real complete template! ^-^
Thanks again Debs!
Regards,
Jacques
-
For the WU script open WU-forecast.php in the Include folder. Around line 1053 you should see: fputs($socketConnection, "GET $resourcePath HTTP/1.1\r\nHost: $domain\r\nConnection: Close\r\nCookie: Units=metric;
Change Units=metric to Units=english and it will change from C to F.
-
Hi Op,
Thanks for the info!! :)
Regards,
Jacques
-
Hi Debs,
I've "polished" your NOAA Forecast page adaptation for Weather Blues
and will launch it shortly... You could see in on this link:
http://weatherbyyou.com/demo/Weather_blues_v2/forecast_adv.php
I'll put what as your signature?
Regards,
Jacques
-
Hi Jacques / Debs,
Is this a forecast solely for the US, or can it be used in other parts of N-America (Canada??)
Thanks,
Arthur
-
Hi Arthur,
Sadly. this is from a U.S. Agency: National Weather Service.
You can see source here: http://www.weather.gov/
Regards,
Jacques
-
Resistance to the metric system is futile :)
-
Thanks OPWeather! that did it. now I have both the NWS and the WU forecasts working for Walsenburg, CO at
http://nrrwx.navajoranch.com
and at the weather station that I set up for my son in Aztec, NM at
http://navajoranch.com/aztecwx/
:)
Debs