Author Topic: WU-Forecast.php - Need to get F Instead of C  (Read 16119 times)

Offline Vern

  • New member
  • *
  • Posts: 2
    • polkscan
WU-Forecast.php - Need to get F Instead of C
« 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

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #1 on: October 30, 2012, 11:34:11 AM »
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
Please, consider supporting this site 

Offline Vern

  • New member
  • *
  • Posts: 2
    • polkscan
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #2 on: October 30, 2012, 10:27:09 PM »
Done that and does not change

Offline edkelly

  • New member
  • *
  • Posts: 4
    • Navajo Ranch.com weather links
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #3 on: January 17, 2013, 07:18:01 PM »
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
Debs Kelly,
navajoranch.com

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #4 on: January 19, 2013, 06:49:37 AM »
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
Please, consider supporting this site 

Offline edkelly

  • New member
  • *
  • Posts: 4
    • Navajo Ranch.com weather links
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #5 on: January 20, 2013, 09:02:41 AM »
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
Debs Kelly,
navajoranch.com

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #6 on: January 20, 2013, 09:27:46 AM »
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
Please, consider supporting this site 

Offline edkelly

  • New member
  • *
  • Posts: 4
    • Navajo Ranch.com weather links
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #7 on: January 24, 2013, 04:24:41 PM »
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
Debs Kelly,
navajoranch.com

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #8 on: January 24, 2013, 06:35:34 PM »
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
Please, consider supporting this site 

Offline opweather

  • New member
  • *
  • Posts: 1
    • OP Weather
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #9 on: January 26, 2013, 06:42:54 PM »
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.

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #10 on: January 27, 2013, 07:35:12 AM »
Hi Op,

Thanks for the info!!  :)

Regards,
Jacques
Please, consider supporting this site 

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #11 on: January 28, 2013, 08:50:37 PM »
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
Please, consider supporting this site 

Offline avoorpool

  • Sr. Member
  • ****
  • Posts: 372
    • http://pickeringweather.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #12 on: January 29, 2013, 05:46:30 PM »
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

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #13 on: January 29, 2013, 08:39:31 PM »
Hi Arthur,

Sadly. this is from a U.S. Agency: National Weather Service.
You can see source here: http://www.weather.gov/

Regards,
Jacques
Please, consider supporting this site 

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: WU-Forecast.php - Need to get F Instead of C
« Reply #14 on: February 02, 2013, 05:06:09 PM »
Resistance to the metric system is futile :)