cloudy cloudy

Author Topic: Carterlake/AJAX/PHP templates available  (Read 328984 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Global Moderator
  • Posts: 5,600
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Carterlake/AJAX/PHP templates available
« on: February 29, 2008, 10:12:11 PM »
I've finished off the docs and packed up the scripts and they're ready for download now.

http://saratoga-weather.org/template/index.php

The Carterlake/AJAX/PHP template set comes in three flavors depending on the location of your weather station -- one set for USA, one for Canada and one for World (non-USA, non-Canada).  The varieties are due to the different support scripts required for forecasts, advisories and radar.

Please read and follow the instructions if you are updating a current Carterlake-based website, or have previously installed the AJAX dashboard/sidebar demo pages .. you'll have to take special care to not alter your existing website while working with the new template set.  If you're going into PHP for the first time, then this should make it easier to set up your website .. you should follow the instructions too  :lol:

The Installation page has a lot of details on how to handle existing copies of scripts that are updated by this template set.

USA DemoCanada DemoWorld Demo

My special thanks to Kevin (TNETweather) and Mike (MCHALLIS) for their assistance in this project, and to Tom (Carterlake) for the original HTML version of the WD templates which form the basis of this PHP-driven version.

Enjoy!

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline BfdWx

  • Posts: 1,604
  • Branford Connecticut
    • Southern CT Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #1 on: February 29, 2008, 10:34:50 PM »
Nice work Ken, I know a lot of people are going to really appreciate this effort. Thank you to all that contributed too!

Regards,

Jack

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #2 on: February 29, 2008, 10:49:07 PM »
I'm a bit confused on what I should use for time zone.

Should I uncomment one of the $ourTZ lines and set it to America/Detroit?

Or should I edit the $SITE['tz']= line to reflect Eastern time zone for Michigan?

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #3 on: February 29, 2008, 11:02:18 PM »
Ken,

In the readme.txt in the wd-webfiles folder 5th line of text should be changed from:

Use the Weather-Display Control Panel, FTP&Connections, Custom Web Page Setup TAB

to:

Use the Weather-Display Control Panel, Web Files/Web Page/Real Time FTP/WDL, Custom Web Page Setup TAB

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #4 on: March 01, 2008, 01:28:46 AM »
Can't seem to get my forecast to be for Grand Rapids, MI either. Line in settings.php is:

$SITE['fcsturlNWS']      = 'http://forecast.weather.gov/MapClick.php?site=GRR&map.x=148&map.y=161&TextType=2';

Line in advforcast2.php is:

$fileName = "http://forecast.weather.gov/MapClick.php?site=GRR&map.x=148&map.y=161&TextType=2";//

Cache has been cleared several times. Files have been uploaded.

Offline saratogaWX

  • Global Moderator
  • Posts: 5,600
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #5 on: March 01, 2008, 01:31:13 AM »
Thanks Tim!  I've corrected it in the distributions.

In Settings.php you should have the correct timezone set there.  The other scripts will pick it up from the
$SITE['tz'] setting.
For the USA, you can use

EST5EDT
CST6CDT
MST7MDT
PST8PDT

if you like (assuming your city doesn't have a special time setting)
Check http://saratoga-weather.org/timezone.txt for other entries that should be valid.

For your advforecast2.php issue, did you update the script with the one in the distribution?
What's the URL to your advforecast2.php ?  If it's http://www.thanko.info/advforecast2.php, it seems to be working for Grand Rapids, MI now  ...


Best regards,
Ken
« Last Edit: March 01, 2008, 01:33:09 AM by ktrue »
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #6 on: March 01, 2008, 01:37:18 AM »
Ken,

I've got the basic templates working.

Forecast just started working. Not sure what I did. It may be that there was a new forecast issued by the NWS at 8:03 pm ET. Maybe I was reading the forecast.txt that had Saratoga in it.

I do have a question although they are really WD questions. I've been unable to get trends-inc.php and testtags.php to upload.

New site is www.thanko.info/wxindex.php.

I'll be working on this furiously over the weekend. I will continue to report any issues that I find.

I really appreciate all the work you put into this, Ken. I've done some development myself and understand the amount of effort that goes into what you've put together.

Offline saratogaWX

  • Global Moderator
  • Posts: 5,600
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #7 on: March 01, 2008, 01:48:10 AM »
Sweet, Tim!  I see you've already done some nice customization ..
Please let me know what you found out about the testtags.php/trends-inc.html upload issue.. sounds like a FAQ in the making.

You're very welcome!  The Docs were the hardest (isn't is always the case).. code is easy/docs are hard.

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #8 on: March 01, 2008, 01:49:39 AM »
Looks like my thermometer.php is currently out to lunch. Seems to have happened after I added the webcam link.

Also, in the rain section I'm showing 9 rain days in Dec. Not sure what is happening there either.

Oops...See this thread about testtags and trends-inc: http://www.weather-watch.com/smf/index.php/topic,27774.0.html. I did not set up the upload in Custom File creation...
« Last Edit: March 01, 2008, 02:08:35 AM by Tim Hanko »

Offline saratogaWX

  • Global Moderator
  • Posts: 5,600
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #9 on: March 01, 2008, 02:02:29 AM »
Just upload the thermometer-blank.png file again.. that should fix the missing graphic.

The template set comes with a dummy testtags.php and trends-inc.html so that while you're developing your site, you won't get a php error for those files being not found.

When you start regular uploads of testtags.txt -> testtags.php and trends-inc.txt -> trends-inc.html, they should replace those dummy files with real data from your weather station.

Best regards,
Ken

BTW.. I've started a template user website link section for the templates .. please let me know your Location and URL of your Carterlake-PHP template website when you go 'live'.
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #10 on: March 01, 2008, 02:09:40 AM »
Looks like moon phases are not correct either.

testtags.php should be uploading now. Daily Stats page is correct.

Resent thermometer-blank.png. Graphic still messed up. I think it is there. It's not displaying correctly.

Offline saratogaWX

  • Global Moderator
  • Posts: 5,600
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #11 on: March 01, 2008, 02:13:49 AM »
Your testtags.php is still the dummy copy (see date in http://www.thanko.info/testtags.php?sce=view )

The thermometer-blank.png still shows
"The image “http://www.thanko.info/thermometer-blank.png” cannot be displayed, because it contains errors."
at http://www.thanko.info/thermometer-blank.png

Try unzipping that file and reuploading ...

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline BfdWx

  • Posts: 1,604
  • Branford Connecticut
    • Southern CT Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #12 on: March 01, 2008, 02:25:51 AM »
Wow the questions are flying lol....I have one too!

I seem to be having an issue with the "get_localdate" function. See....http://www.branfordfire.com/weather/wx7play.php

The UTC time seems correct but it is not converting the local time date. Is this some type of daily update?

Regards,

Jack

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #13 on: March 01, 2008, 02:26:13 AM »
Ken,

I stole the therm..blank.png directly from your web site and uploaded it to mine. Still get the same error. This is very strange. It is looking for the file in the root, right?

Me again.  :oops: Forgot to change the FTP transfer type back from ASCII to binary. Doh...

Looks like the moon phases are correct now also. I think I'll quit for the night. Making more mistakes than a politician... :D
« Last Edit: March 01, 2008, 02:31:29 AM by Tim Hanko »

Offline saratogaWX

  • Global Moderator
  • Posts: 5,600
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Carterlake/AJAX/PHP templates available
« Reply #14 on: March 01, 2008, 02:34:45 AM »
Wow the questions are flying lol....I have one too!

I seem to be having an issue with the "get_localdate" function. See....http://www.branfordfire.com/weather/wx7play.php

The UTC time seems correct but it is not converting the local time date. Is this some type of daily update?

Regards,

Jack
Hi Jack!  Yep.. love the flying questions.  My thanks to Tim for being an early adopter.

It looks like your wx7play.php page is showing EST conversions now.. is it still a problem?

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

 

cumulus