Page 32 of 54

Re: Now available: AJAX/PHP multilingual website templates

Posted: Fri 16 Sep 2011 8:44 pm
by saratogaWX
Another small change to the WU-forecast.php (ML) to address yet another WU website change. I sure hope their website stabilizes soon.

Download: WU-forecast.php (ML) Version 1.22 16-Sep-2011 for old WD/PHP/World-ML or V3 Base-World template set)
or use the Update utility for V3 templates

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Fri 16 Sep 2011 9:17 pm
by JennyLeez
Hi Ken,
Talk about go from one extreme to another.
Many thanks once again for fix. You must be getting sick of working on this file for sure.
Cheers
Jenny

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 21 Sep 2011 10:13 pm
by saratogaWX
Posted an update to ajaxCUwx.js and CU-defs.php (with a new spec in Settings-weather.php) to support selection of feelslike temperature from either heat-index(default), humidex, or apparent temperature.

Updates from update utility page.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 05 Oct 2011 12:31 pm
by WoodburyMan
Just did the latest update. Not sure if it's the update or just happened to be at the time time, or something wrong with Weather.gov's servers. If I go to my forecast page ( http://www.grudzien.us/wxforecast.php ) and click on "Hazardous Weather Outlook", it gives me this link. http://www.weather.gov/showsigwx.php?wa ... er+Outlook Going to that page I get the following message..
National Weather Service
Wed Oct 05 2011 08:19:50 GMT-0400 (Eastern Daylight Time)
This site will be down for maintenance on Saturday 10/1.

Please use the following links for NWS forecasts and services.Forecasts:
http://forecast.weather.gov/zipcity.php
*Please type your zip code into the search box

Radar:
http://radar.weather.gov

Air Quality:
http://airquality.weather.gov

Aviation:
http://aviationweather.gov

River and Lake Forecasts and Observations:
http://water.weather.gov

Graphical Forecasts:
http://graphical.weather.gov


We apologize for any inconvenience that this might cause.
Not sure how long it's been doing that, given it's now the 5th and they stated it would only be down the 1st it might be an issue. **HOWEVER** I noticed if I go to Weather.gov and type in my zip code to view the forecast on their site, I get the "Hazardous outlook" link there it works. http://forecast.weather.gov/showsigwx.p ... er+Outlook Notice the URL has forecast.weather.gov where as the other doesn't have the forecast subdomain. The same also goes for the frost advisory (Our first of the year :) ) on the forecast page, however it works on the main Advisory page and Home/Index page perfectly fine, only the Forecast page does this.

The Line/URL I use for that location for forecast in Settings.php is the following if it helps

Code: Select all

"KOXC|Woodbury|http://forecast.weather.gov/MapClick.php?lat=41.55496712080976&lon=-73.22537899017334&site=aly&unit=0&lg=en&FcstType=texttextField2=-122.022&e=1&TextType=2",
If I enter that URL manually into my browser and view the page, the links on the page for the advisories work fine as well.

Any insight would help. Thanks!

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 05 Oct 2011 1:34 pm
by saratogaWX
Looks like the NWS is tweaking the website again, and no longer offers warning info via www.weather.gov (but instead uses forecast.weather.gov, as you said).

Thanks for spotting the issue! I've fixed the advforecast2.php script (V3.02) and it's now available via the updates page for Base-USA template users.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 05 Oct 2011 1:43 pm
by WoodburyMan
Wow! That was quick! Uploaded and works like a charm. Thanks!!!

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 6:45 am
by vpokroglo
Hi,

I download latest updates from saratoga-weather for cumulus, world base. But there is ajaxWDwx.js not ajaxCUwx.js. Is it possible to have support for alternative animated icon set from http://www.meteotreviglio.com/ for Cumulus also?

thx, Marko

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 8:37 pm
by saratogaWX
You can use the Animated icons from Meteotreviglio with the Cumulus plugin.

There is no ajaxCUwx.js update since the conditions icon on the dashboard is not updated by the AJAX script, only by the PHP of the dashboard itself (based on the nearby METAR conditions). The Cumulus realtime.txt does not currently have a 'icon number' for current conditions (unlike Weather-Display's clientraw.txt), so no AJAX update is currently possible.

Hope this helps...
Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 8:46 pm
by nitrx
saratogaWX wrote:You can use the Animated icons from Meteotreviglio with the Cumulus plugin.

There is no ajaxCUwx.js update since the conditions icon on the dashboard is not updated by the AJAX script, only by the PHP of the dashboard itself (based on the nearby METAR conditions). The Cumulus realtime.txt does not currently have a 'icon number' for current conditions (unlike Weather-Display's clientraw.txt), so no AJAX update is currently possible.

Hope this helps...
Best regards,
Ken
Where do the icons come from for the metar conditions in cumulus ?

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 9:23 pm
by saratogaWX
nitrx wrote:
saratogaWX wrote:You can use the Animated icons from Meteotreviglio with the Cumulus plugin.

There is no ajaxCUwx.js update since the conditions icon on the dashboard is not updated by the AJAX script, only by the PHP of the dashboard itself (based on the nearby METAR conditions). The Cumulus realtime.txt does not currently have a 'icon number' for current conditions (unlike Weather-Display's clientraw.txt), so no AJAX update is currently possible.

Hope this helps...
Best regards,
Ken
Where do the icons come from for the metar conditions in cumulus ?
The conditions icons (both the .jpg and Meteotreviglio .gif versions) are in the ajax-images/ directory. The update on Oct 1st added the Meteotreviglio .gif conditions icons to the distribution directory (with Paolo's kind permission).

For Cumulus plugin, the get-metar-conditions-inc.php script fetches, caches and parses your nearby METAR and determines the words and icon to use. The specific METAR used is specified in Settings-weather.php.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 9:28 pm
by nitrx
Okay thank you

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 9:38 pm
by nitrx
I think i"ve to substitute jpg in gif ?

Code: Select all

 $IconsLarge = array(
	"skc.jpg",          //  0 imagesunny.visible
	"nskc.jpg",         //  1 imageclearnight.visible
	"bkn.jpg",          //  2 imagecloudy.visible
	"sct.jpg",          //  3 imagecloudy2.visible
andso-on ...

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 9:52 pm
by saratogaWX
Ummm... no.. you don't need to change the specific scripts. On WXForum.net I'd said
For those with template sets, I've updated multiple scripts to support the new animated GIF icon sets:

Template updates at http://saratoga-weather.org/wxtemplates/updates.php

Scripts updated:
plaintext-parser.php (WXSIM formatter)
WU-forecast.php (International WeatherUnderground forecast)
advforecast2.php (NWS forecast)
ajax-dashboard.php (the default one, not the alternative dashboard from websterweather)
ajaxWDwx.js (Weather-Display conditions icon update)
Settings.php (add a new setting to specify forecast/condition icon type)
get-metar-conditions-inc.php (support for animated icons)
ajax-images/*.gif (added corresponding conditions icons to set)

Note: you'll need to visit the animated icon download site, unpack the .rar file into your forecast/images/ directory and upload it for the scripts to find the new forecast icons.

Thanks to Paolo for letting me include some of his set in the distribution files for use as conditions icons!
Using the http://saratoga-weather.org/wxtemplates/updates.php and set the query for 1 Oct 2011 with your Base and Cumulus-plugin will get you all the files that are needed in the stock templates. You'll also have to put the Meteotreviglio .gif icons in your forecast/images/ directory (where your current .jpg forecast icons reside).

Then in your Settings.php, just add

Code: Select all

$SITE['fcsticonstype']= '.gif'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
and the dashboard and forecast script(s) will all use the animated icons.


Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 9:58 pm
by nitrx
Aha well I've to do something tommorow thanks for explaining :!:

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 06 Oct 2011 11:13 pm
by gemini06720
saratogaWX wrote:The Cumulus realtime.txt does not currently have a 'icon number' for current conditions (unlike Weather-Display's clientraw.txt), so no AJAX update is currently possible.
Ken, a little correction to your statement... ;)

The Cumulus-produced 'realtime.txt' does contain a forecast number, field number 49 "The number of the current forecast as per Strings.ini. If the forecast is not being provided by the station and not being generated by Cumulus a value of 0 (zero) is returned" - this is equivalent to the "<#forecastnumber>" Webtag.

The number contained in field #49 (of 'realtime.txt') might not refer to an icon as such, but that number can easily be associated with a group of icons - many of us have done so. The only negative aspect with the 'realtime.txt' forecast number is that it is based on a formula (the Zambretti Forecaster) which calculates the forecast 12 hours into the futur - not a near-immediate forecast (1-6 hours in the futur) as offered by software such as Weather Display, WXSIM and services such as METARs, Weather Underground, just to name a few.