WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: saratogaWX on February 29, 2008, 09:04:19 PM

Title: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on February 29, 2008, 09:04:19 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
(http://saratoga-weather.org/template/USAIndex-sm.gif) (http://saratoga-weather.org/template/WD-USA/wxindex.php)(http://saratoga-weather.org/template/CanadaIndex-sm.jpg) (http://saratoga-weather.org/template/WD-Canada/wxindex.php)(http://saratoga-weather.org/template/WorldIndex-sm.jpg) (http://saratoga-weather.org/template/WD-World/wxindex.php)

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
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on March 22, 2008, 08:43:11 PM
Just thought I'd give this thread a quick bump. These scripts are amazing and should be checked out by anybody looking for a plug and play web  site!

Regards,

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 03:04:57 AM
Geez, right after I get my site up and running, I find this thread with PHP. I like the lay out alot more and like the ability to change color and screen size. That and all the scripts I want are in PHP. Now, I wonder how long it will take me to get these up and running.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 09:28:19 AM
Quote
I find this thread with PHP

If your web site is capable of php this is the way to go. Ken's instructions are easy to follow but if you get stuck he'll be there to help. Besides the templates being such a nice presentation of your data, php gives you a lot of other opportunities.

Regards,

Jack           
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 01:08:08 PM
I use Go-Daddy for my host and they support PHP. So, I will be setting up the new templates. Still a learning experiance, but I am getting the hang of it. The one thing I think that could be added for beginners would be a webcam page that is already setup to where all you needed to do was add the file name into the document for the camera . I guess I will get started and see what happens.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 02:55:41 PM
I installed the new templates, updated everything as in the directions and I get this error when I try to view the wxindex.php file. Actually, every webpage with .PHP  I try to open does this. --->could not open XML input from ./flyout-menu.xml. What did I do wrong?
I am thinking it is the . that is causing the problem, but not sure.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 03:15:17 PM
Not really sure why this error is coming up but try this in your settings page....

Code: [Select]
$SITE['flyoutmenu'] = true; // set to false to use classic menubar.php instead
change "true" to false and see if it makes a difference for now. Did you upload the flyout-menu.php?

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 03:18:30 PM
I did upload the 3 flyout files. They are flyout-menu.php, flyout-menu.xml, flyout-menu-test.xml I will try your suggestion.

EDIT: That works. I can load the pages now. Thanks.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 03:23:05 PM
The flyout menu also rely's on your image file location, there are a bunch of .gif images that need to be uploaded (they should and then the path to them properly expressed in the flyout-menu.php

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 03:29:55 PM
Looks good! You need to resolve the images folder and that should get the thermometer working too....make sure the thermometer.php is uploaded too! You seem to be well on your way though, nice job!

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 03:45:17 PM
I have the thermometer.php in the root directory, but it does not seem to find it. I have the images in the ajax-images dir. I tried removing the . for the xml files since they are in the root dir also, but it did not work. I also uploaded the forcast images into forecast/image dir. Seems the forcast is not working either. Also in widescreen, the updating widget in the top right corner bugs out and does not display right.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 04:15:23 PM
Your thermometer.php cannot find your thermometer-blank.png see......http://myidahoweather.com/thermometer.php

I can see your thermometer-blank.png in your root directory so in your thermometer.php it should say

Code: [Select]
$BlankGraphic  = './thermometer-blank.png'; // relative file address for thermometer blank image PNG
Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 04:50:09 PM
I went through the setting.php file again and checked all the setting. The thermometer file now shows what you posted and still does not work. Also the fly menu still does not work either with all the settings as original, so have it set to false.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 05:04:35 PM
Something is still wrong with your images file....

http://myidahoweather.com/forecast/images/blizzard.jpg  should bring me to the forecast img for blizzard as it does on mine...

http://stillweather.com/forecast/images/blizzard.jpg

You should have a folder on your web site called "forecast" with a subdirectory in that folder called "images"

Your ./ajax-images file seems to be working properly as all your arrow gifs seem fine.

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 05:12:52 PM
Something is still wrong with your images file....

http://myidahoweather.com/forecast/images/blizzard.jpg  should bring me to the forecast img for blizzard as it does on mine...

http://stillweather.com/forecast/images/blizzard.jpg

You should have a folder on your web site called "forecast" with a subdirectory in that folder called "images"

Your ./ajax-images file seems to be working properly as all your arrow gifs seem fine.

Jack

Fixed that problem, seems I can not spell today.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 05:21:11 PM
OK, good.

I can see your thermometer-blank.png here....http://myidahoweather.com/thermometer-blank.png

So now look in the thermometer.php script and make sure it is pointing to this.....

Code: [Select]
$BlankGraphic  = './thermometer-blank.png'; // relative file address for thermometer blank image PNG
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 05:27:23 PM
OK, good.

I can see your thermometer-blank.png here....http://myidahoweather.com/thermometer-blank.png

So now look in the thermometer.php script and make sure it is pointing to this.....

Code: [Select]
$BlankGraphic  = './thermometer-blank.png'; // relative file address for thermometer blank image PNG

I checked the file and it shows exactly what you posted.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 05:34:18 PM
Hmmmmm.....looks like we need Ken's help here! It's got me stumped! I'll send him an e-mail for help!

BTW another thing to start looking at is your testtags.php. WD needs to parse that file, the instructions for doing this are in the readme docs. Your current testtags data is old.

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 06:26:56 PM
Hmmmmm.....looks like we need Ken's help here! It's got me stumped! I'll send him an e-mail for help!

BTW another thing to start looking at is your testtags.php. WD needs to parse that file, the instructions for doing this are in the readme docs. Your current testtags data is old.

Jack
I followed the readme.txt, but the file does not update to the current time/date. Still shows the old time and date. I am not sure I set the time zone correctly in the settings file either. On the templates, the time zone shows "PST8PDT". When I look the time zone up in the text document provide, I do not see anything in this format. My time zone according to the text shows "US   +433649-1161209   America/Boise   Mountain Time - south Idaho & east Oregon". I used America/Boise. Is this the correct format?
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 06:36:10 PM
Quote
I used America/Boise. Is this the correct format?

That should be fine.

Were you able to follow the WD part? In other words in WD>control panel>web files/web page>custom web page setup.....?
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 06:38:17 PM
Quote
I used America/Boise. Is this the correct format?

That should be fine.

Were you able to follow the WD part? In other words in WD>control panel>web files/web page>custom web page setup.....?

Yes, I copied the 2 files into my webfiles dir. I then went to WD>control panel>web files/web page>custom web page setup, entered the file names for local, then for remote, clicked test, and then ok.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: mchallis on April 06, 2008, 06:40:17 PM
There is a bug in  rss-top-warning.php - V1.02 25-Mar-2008
on
Line 149
change
Code: [Select]
           $Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. \n";

to
Code: [Select]
           $Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. --> \n";

That is causing your index page to half load
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 06:43:36 PM
There is a bug in  rss-top-warning.php - V1.02 25-Mar-2008
on
Line 149
change
Code: [Select]
           $Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. \n";

to
Code: [Select]
           $Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. --> \n";

That is causing your index page to half load

Changed and uploaded.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 06:45:14 PM
Quote
Yes, I copied the 2 files into my webfiles dir. I then went to WD>control panel>web files/web page>custom web page setup, entered the file names for local, then for remote, clicked test, and then ok.

OK, now go to control panel>internet file creation> and find file#29 (page 2) and enable file creation and upload
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 06:51:52 PM
Quote
Yes, I copied the 2 files into my webfiles dir. I then went to WD>control panel>web files/web page>custom web page setup, entered the file names for local, then for remote, clicked test, and then ok.

OK, now go to control panel>internet file creation> and find file#29 (page 2) and enable file creation and upload

I did this.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 06:58:09 PM
Quote
I did this.

Does your FTP log show that the files are being uploaded? So far it is still old data on your site.....maybe it has not cycled yet?
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: mchallis on April 06, 2008, 06:58:29 PM
Your thermometer script is throwing an error loading the PNG right where imagecreatefrompng is called.
It could be related to your PHP configuration.
Here is a new line of error diagnostic code you can put in it.

inside thermometer.php


Change
Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}

to

Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}
if( ! function_exists("imagecreatefrompng")){
  die("Sorry.. this script requires the GD library compiled with PNG support in PHP to function.");
}

Then I can see if that was the cause or not.

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 07:01:35 PM
Your thermometer script is throwing an error loading the PNG right where imagecreatefrompng is called.
It could be related to your PHP configuration.
Here is a new line of error diagnostic code you can put in it.

inside thermometer.php


Change
Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}

to

Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}
if( ! function_exists("imagecreatefrompng")){
  die("Sorry.. this script requires the GD library compiled with PNG support in PHP to function.");
}

Then I can see if that was the cause or not.



Changed and uploaded.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: mchallis on April 06, 2008, 07:07:19 PM
There could be a permissions problem or something, I am not sure yet.
what is your server type? IIS or Apache?
what version of PHP?

You might try "Testing to see if PHP is available on your website" on this page:
http://saratoga-weather.org/scripts.php

You have to install the test file, then ..

The results should tell if your php has all the correct image libraries enabled.
http://saratoga-weather.org/test.php (http://saratoga-weather.org/test.php)
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 07:14:20 PM
There could be a permissions problem or something, I am not sure yet.
what is your server type? IIS or Apache?
what version of PHP?

You might try "Testing to see if PHP is available on your website" on this page:
http://saratoga-weather.org/scripts.php

You have to install the test file, then ..

The results should tell if your php has all the correct image libraries enabled.
http://saratoga-weather.org/test.php (http://saratoga-weather.org/test.php)

Test.php is loaded on my server for you to see. It does work. Go-Daddy is my host, they use IIS 6.0., PHP version 4.3.11
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: mchallis on April 06, 2008, 07:21:28 PM
There could be a permissions problem or something, I am not sure yet.
what is your server type? IIS or Apache?
what version of PHP?

You might try "Testing to see if PHP is available on your website" on this page:
http://saratoga-weather.org/scripts.php

You have to install the test file, then ..

The results should tell if your php has all the correct image libraries enabled.
http://saratoga-weather.org/test.php (http://saratoga-weather.org/test.php)

Test.php is loaded on my server for you to see. It does work. Go-Daddy is my host, they use IIS 6.0., PHP version 4.3.11

It must be some permissions problem then.
You are also having a problem with the forecast page and permissions. If you vie the source of that page it gives you hints in the comments

<!-- unable to write cache file forecast.txt -->

That means you PHP does not have permission to create and write to files.
Tip: If you get a PHP error about file permissions,
try changing the forecast.txt file permissions to 755, or on some servers 777
on some servers you have to create a blank forecast.txt and then change the permissions
http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 07:31:26 PM
There was no forecast.txt on the server, so I created a blank. It has full permission.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: mchallis on April 06, 2008, 07:41:47 PM
There was no forecast.txt on the server, so I created a blank. It has full permission.

fsockopen is a network command used by the script to fetch the forecast URL, then cache it.
You are having a problem with fsockopen not working on ISS.
I am running out of help for ISS issues, I only use Apache, sorry.

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 07:43:24 PM
There was no forecast.txt on the server, so I created a blank. It has full permission.

fsockopen is a network command used by the script to fetch the forecast URL, then cache it.
You are having a problem with fsockopen not working on ISS.
I am running out of help for ISS issues, I only use Apache, sorry.



Its just my luck. I appreciate the help. Maybe someone else will figure this out.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 07:46:32 PM
Quote
I am running out of help for ISS issues, I only use Apache, sorry.

I had MAJOR issues with IIS which Ken was able to get me through, I recently switched to GoDaddy/e-rice and have no problems. Stick with this though, at least until Ken has a chance to look this over.

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 07:50:27 PM
I plan on working through this. I still can't get the testtags.php to update with the correct info. Hopefully I can figure it out. I think this may be some of the problem.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 06, 2008, 08:05:33 PM
Sorry to be a bit late to reply.. been out and about with our guests from Denmark.

It looks like your server is not allowing outbound connections with fsockopen, but it doesn't say why (the
Code: [Select]
<!-- Network error:  () --> in the pages that use the function (forecast, advisory, earthquake, etc) all complain the same.

Would you mind putting up a .php page with just
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PHP Info</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>
in it.  Call the page anything you like, just make sure it has .php as the extension, then send me the URL on your site and I can take a look at the settings for PHP.

Couple of questions about your IIS host:
1) is this a commercial webhoster or are you running the server yourself?
2) if a commercial hoster, is it possible (and financially feasible) to switch to a Linux/Apache service?
  (over 80% of websites are Linux/Apache .. IIS is only for the diehard Micro$oftians :-) )

The updating of testtags.php (and trends-inc.html) is by Weather-Display.  You should use this setup to get those files uploading:

copy the testtags.txt and trends-inc.txt to your c:\wdisplay\webfiles directory.

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

In the 'Special file conversion' area

put:  trends-inc.txt     in local file 1
      trends-inc.html    in Remote file name 1

      testtags.txt       in Local File 2
      testtags.php       in Remote file name 2

Turn the switch to ON

Press Test

Press OK to save the settings.



Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 08:08:20 PM
testtags appears to be ok now!

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 08:10:11 PM
He is the the link to the file you wanted uploaded. http://myidahoweather.com/test1.php (http://myidahoweather.com/test1.php) This is a commercial host Go-Daddy.com.

As far as the testtags.php, for some reason it was updating locally, but not to the server.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 06, 2008, 08:19:25 PM
Thanks...

Here's the problem:  Your hoster has the following functions DISABLED

disable_functions   getmyinode, getopt, getrusage, extension_loaded, dl, mysql_pconnect, crack_check, crack_closedict, crack_getlastmessage, crack_opendict, fsockopen, pfsockopen,  mysql_list_dbs, mysql_stat, ini_get, ini_get_all, ini_alter, ini_set, get_current_user, get_defined_constants, get_include_path,  php_ini_scanned_files, php_uname, phpcredits, restore_include_path, set_include_path, set_time_limit, version_compare, zend_version, getmypid, getmyuid, getmygid, assert_options, assert, fopen, fwrite, fread, file, fpassthru, file, mail, opendir, readdir, closedir

This is quite nasty on their part, as the template website needs:
fsockopen
fopen
fread
fwrite
file

in multiple scripts.

Try this:
Create a file named php.ini in the document root of your website.  Put in the file:
Code: [Select]
disable_functions = "";
safe_mode = off;
and upload it to your website.  We'll see if we can override the default setting to get back the functions we need.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 08:22:44 PM
Created and uploaded.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 06, 2008, 08:24:21 PM
Including the (hastily added)

safe_mode = off;

?

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 08:27:31 PM
Including the (hastily added)

safe_mode = off;

?



It is now.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 06, 2008, 08:33:33 PM
And... It's not having any effect, so GoDaddy's IIS service is 'locked down'.  As it is locked, you only have two recourses:

1) call their tech support and say "I need to be able to turn off safe_mode and use the functions fsockopen, fread, fclose and file"  can that be done on the IIS service?

if they say 'no', then ask them question (2)

2) can I be moved to a Linux/Apache service that doesn't force me to use safe_mode with PHP and does allow those functions?

If they say 'no', then tell them 'Hasta la vista' and move your domain to a webhoster that does.

Sorry, but if they refuse to allow rational PHP usage, then they don't deserve your business.
I can suggest e-rice.net, icdsoft, 1and1, lunarpages as hosters that are rational and the scripts work fine on them.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 08:35:34 PM
Thanks for your help. I will call and see what they say. I hope they are willing to work with me.

Edit: Sent them an Email to see what they say. If I remember right, when I signed up, they had the choice of Windows or Linux. I just went with windows thinking it was the way to go since I use windows. Seems that may have been a bad choice, but at least I am learning. I don't think it should be a problem switching.

EDIT: I got snooping around on Go-Daddy and it seems all I had to do was go to my account and switch my platform OS. It should be switched over in a few hours.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 06, 2008, 09:55:12 PM
WOOOOOOOT!!!!!  \:D/ Seems IIS was the problem. Linux works fine. Site is up and running! Thanks for all you help guys.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 06, 2008, 10:37:22 PM
Excellent!  Congratulations!

I've added your site to the list of WD/AJAX/PHP template sites.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 06, 2008, 11:28:20 PM
prvrt

Excellent, I'm glad it worked out for you. Without Ken I would have never figured all that out or even how to do it!!! Hopefully this whole thread will help somebody else in the same situation. I have to think that others have done the same as you when they signed up.

Jack

ps...nice job as always Ken!
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 07, 2008, 12:46:38 AM
Whew!  That IIS (and it's foibles) will be the death of me yet  :lol:

Sometimes you just have to see what phpinfo(); says is available.  The Microsoft IIS hosting was primarily for ASP.Net functions, and the PHP appeared to be a (much crippled) afterthought.  The killer was it wouldn't listen to what was in the php.ini file, so there was no hope of getting it to work with that particular implementation (IIS/PHP).

I'm really glad that prvrt had an easy time switching to the Linux hosting platform, so he's not out any $$$ trolling for a new hoster.

Moral:  Unless you're planning on using .asp pages, avoid the Microsoft/IIS/PHP servers and stick with Linux/Apache/PHP (like most of the world).. you'll thank yourself for not encountering the strange IIS/PHP foibles :-)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 07, 2008, 10:29:32 PM
I now have a couple more questions.

1. How do I use the fly out menu. I do have it set to true in "settings", but not sure how to make it work in "menubar". I would like to add some external links from my "Web Cameras" menu to other cams in the area.

2. On the radar page when I zoom out to the last 2 settings, the red dot that shows the town moves from Idaho where it should be, to the west coast. Shows the coast of Oregon on the 2nd zoom out, all the way out shows around San Fransico. Is that possible to fix?

Other than that, things seem to be working great. Thanks again for all your help.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BfdWx on April 07, 2008, 11:18:46 PM
How long ago did you first download the package? There were some changes made to the menubar.php to call the flyout menu into it. If you have a recent version I'm afraid I'm not sure what the issue is, sorry.

Jack
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 07, 2008, 11:27:48 PM
I now have a couple more questions.

1. How do I use the fly out menu. I do have it set to true in "settings", but not sure how to make it work in "menubar". I would like to add some external links from my "Web Cameras" menu to other cams in the area.

2. On the radar page when I zoom out to the last 2 settings, the red dot that shows the town moves from Idaho where it should be, to the west coast. Shows the coast of Oregon on the 2nd zoom out, all the way out shows around San Fransico. Is that possible to fix?

Other than that, things seem to be working great. Thanks again for all your help.

Jack is correct, the flyout-menu set was added to the distributions on Version 1.14 - 19-Mar-2008 - Flyout-menu system added, updated weather-screen-*-*.css and include-style-switcher.php to V1.08 (Mike Challis) (Canada, USA, World)
If you downloaded before that, then your copy doesn't have the flyout-menu capability.  If that's the case, I'd suggest you download a fresh copy of the distribution, save off your Settings.php, and upload the fresh copy, the overwrite the distribution's Settings.php with your copy, and check the configuration for the flyout-menu in the settings setup page on my site.

For the WU-Radar, you'll need to do a customization of the nine different dots for your site by using the WU-radar-testpage.php?show=loc and following the instructions at http://saratoga-weather.org/scripts-WUradar.php#WUradar

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: ncpilot on April 07, 2008, 11:31:03 PM
Can't remember if I posted to you or someone else, but on your webcam page, the link you have is to your internal IP address, not external WAN...

This is the photo link I see both at the bottom of my browser when the page is loading, and when I right-click on the blank image to get info: 

"http://192.168.1.150:6969/SnapshotJPEG?"

This needs to be the WAN_IP:6969 for the outside world to see the image...

I now have a couple more questions.

1. How do I use the fly out menu. I do have it set to true in "settings", but not sure how to make it work in "menubar". I would like to add some external links from my "Web Cameras" menu to other cams in the area.

2. On the radar page when I zoom out to the last 2 settings, the red dot that shows the town moves from Idaho where it should be, to the west coast. Shows the coast of Oregon on the 2nd zoom out, all the way out shows around San Fransico. Is that possible to fix?

Other than that, things seem to be working great. Thanks again for all your help.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 07, 2008, 11:32:41 PM
How long ago did you first download the package? There were some changes made to the menubar.php to call the flyout menu into it. If you have a recent version I'm afraid I'm not sure what the issue is, sorry.

Jack

I D/L it on Sunday, so it should be current. I have no idea how to add the links into the flyout menu. Right now, everything is a single link. I would like to be able to have multiple links from the single link.  ie: Webcams-->My Cams/Weather Cams/Nature Cams/Hiway Cams.

Thanks for the directions, I will work on the radar.
EDIT:Radar is done.

I'll check the address for the cam, thought I fixed that already.
EDIT: Webcam should be fixed.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on April 08, 2008, 12:05:26 AM
To enable the flyout-menu, you'll need to change your Settings.php to have
Code: [Select]
$SITE['flyoutmenu'] = true;
Then you can configure the menu by editing flyout-menu-test.xml to add items (as shown in the file), test the menu by using index.php?menu=test to see the result, fixing any XML errors (and repeat until clean).  Then you can copy flyout-menu-test.xml over flyout-menu.xml , upload flyout-menu.xml and it will be your new menu.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on April 08, 2008, 12:13:24 AM
To enable the flyout-menu, you'll need to change your Settings.php to have
Code: [Select]
$SITE['flyoutmenu'] = true;
Then you can configure the menu by editing flyout-menu-test.xml to add items (as shown in the file), test the menu by using index.php?menu=test to see the result, fixing any XML errors (and repeat until clean).  Then you can copy flyout-menu-test.xml over flyout-menu.xml , upload flyout-menu.xml and it will be your new menu.

Best regards,
Ken

That was what I was looking for. I was looking in the wrong place. I had the setting.php set to true, but was not sure what to do next. Thanks
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: ADM on July 07, 2008, 07:02:00 AM
I am just now attempting to get WD setup (been using VWS).  For us "new" WD users is there any documentation outlining the specifics of what is needed from WD to provide the necessary information for the templates?  WD is a great application and there is a quite a bit of setup needed.  Finding out just need what is required for the templates would be extremely helpfull.  I have the template site running but struggling with getting data out of WD.

Many Thanks!
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on July 07, 2008, 11:33:50 AM
Hi!
It would help to know which flavor of the template you're using (USA, Canada, World), and to have an URL to the main page on the site.

There are three data files needed by the USA/Canada/World template set:
1) testtags.php (for the majority of the weather data)
2) trends-inc.html (for the wxtrends.php page) and
3) clientraw.txt (for the near-real-time AJAX updates)

The first two files have instructions in the WD-webfiles/README.txt for how to set up WD to upload them routinely.

The clientraw.txt file is done via the WD, Control Panel, WebFiles/Web Page/Realtime FTP, RealtimeFTP TAB

Tick: rename the file as a temporary file
5 Sec delay between uploading data
Tick: Upload the extra file every 5 minutes
Tick: Upload the clientrawhour every 5 minutes

Turn the main switch to On, press Start Now and OK
You should see a small yellow icon in the taskbar with a red up-arrow showing up every 5 seconds.. that will be the clientrawrealtime uploader process running.

Sorry there isn't a shorcut sheet (quite yet) on what to set up for the template set :(

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: ADM on July 07, 2008, 07:25:09 PM
I am using the USA version.  I have followed your instructions but still am not getting current infoprmation as it relates to "Almanac" information and "rain days in".  This is my "test" link http://php.rockycreekweather.com/wxindex.php

Also, can't seem to get anything updated from the "Almanac" menu other than the monthly reports.

Many thanks!
............

Hi!
It would help to know which flavor of the template you're using (USA, Canada, World), and to have an URL to the main page on the site.

There are three data files needed by the USA/Canada/World template set:
1) testtags.php (for the majority of the weather data)
2) trends-inc.html (for the wxtrends.php page) and
3) clientraw.txt (for the near-real-time AJAX updates)

The first two files have instructions in the WD-webfiles/README.txt for how to set up WD to upload them routinely.

The clientraw.txt file is done via the WD, Control Panel, WebFiles/Web Page/Realtime FTP, RealtimeFTP TAB

Tick: rename the file as a temporary file
5 Sec delay between uploading data
Tick: Upload the extra file every 5 minutes
Tick: Upload the clientrawhour every 5 minutes

Turn the main switch to On, press Start Now and OK
You should see a small yellow icon in the taskbar with a red up-arrow showing up every 5 seconds.. that will be the clientrawrealtime uploader process running.

Sorry there isn't a shorcut sheet (quite yet) on what to set up for the template set :(

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on July 07, 2008, 10:28:53 PM
Thanks for the info!

I see your testtags.php is not uploading, and your trends-inc.html is not current.  Did you take (from the WD-webfiles/ dir in the distribution)

testtags.txt
trends-inc.txt

need to be placed in your Weather-Display \webfiles directory.

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

In the 'Special file conversion' area

put:  trends-inc.txt     in local file 1
      trends-inc.html    in Remote file name 1

      testtags.txt       in Local File 2
      testtags.php       in Remote file name 2

Turn the switch to ON

Press Test

Press OK to save the settings.

You may also have to use the WD, Control Panel, Internet File Creation/Uploads, Setup Page#2 TAB

and for File#29 (Special Custom File Convers.), press SET

Select Update every 5 minutes, switch Use These Settings to ON and press OK to save settings.
It may be that you just don't have an upload frequency set for those files.

Check it by viewing http://php.rockycreekweather.com/testtags.php?sce=view
and making sure that
Code: [Select]
$time = "9:10 PM"; // current time
$date = "12/22/07"; // current date
have changed to your current date/time.  That indicates the upload was successful.

Do the same for your wxtrends.php page and make sure the date/time at the top is 'current'.

You are also missing some cache files:

forecast.txt
uv-forecast.txt

Create blank files and upload them, then set the permissions to 666 or 777 so they can be written by PHP .. it will speed up the loading of your pages.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on July 07, 2008, 10:52:25 PM
Ken, I just noticed today after looking at my website for a few months  :oops: that my Solar Radiation shows (current number)W/m2(0%). Why does the 0% never change? Is there something I missed? Also, what exactly is this the % of? Thanks for your help.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on July 07, 2008, 11:18:41 PM
The (nn%) is the percentage of expected solar radiation for your lat/long/date/time .. it's a figure computed by Weather Display, and the percentage is used (if you select it) to estimate your cloud cover (WD, Control Panel, Solar Sensor, Threshold/Icon/Solar Description TAB)

Mine is set for:
83% and up, 'Sunny'
65% and up, 'Mostly Sunny'
35% and up, 'Partly Cloudy'
10% and up, 'Mostly Cloudy'
<10% 'Overcast'
0% for dark/night 'Night Time'

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on July 08, 2008, 12:00:24 AM
Thanks Ken, always helpful with precise instructions.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: ADM on July 08, 2008, 08:31:52 AM
I fixed it.  Thanks again for your help!

Ken, thanks for all your help.  I believe I have most of this straightened out excpet for the "trends" page http://php.rockycreekweather.com/wxtrends.php.  Date at the top of tha page appears to be off.  I have checked everywehre I can think of but no success.  Also, no UV information on the "home page".

Since I have just begun using WD I think most of the issues were related to getting WD setup to use the templates.  AT this point I may have more options in WD setup than may be needed.  It would be great if there were a document outlining the basic setup needed for WD when using these templates.  If I can help with that document in any way let me know.

Once again, thanks for your help and the great templates!

Al...

Thanks for the info!

I see your testtags.php is not uploading, and your trends-inc.html is not current.  Did you take (from the WD-webfiles/ dir in the distribution)

testtags.txt
trends-inc.txt

need to be placed in your Weather-Display \webfiles directory.

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

In the 'Special file conversion' area

put:  trends-inc.txt     in local file 1
      trends-inc.html    in Remote file name 1

      testtags.txt       in Local File 2
      testtags.php       in Remote file name 2

Turn the switch to ON

Press Test

Press OK to save the settings.

You may also have to use the WD, Control Panel, Internet File Creation/Uploads, Setup Page#2 TAB

and for File#29 (Special Custom File Convers.), press SET

Select Update every 5 minutes, switch Use These Settings to ON and press OK to save settings.
It may be that you just don't have an upload frequency set for those files.

Check it by viewing http://php.rockycreekweather.com/testtags.php?sce=view
and making sure that
Code: [Select]
$time = "9:10 PM"; // current time
$date = "12/22/07"; // current date
have changed to your current date/time.  That indicates the upload was successful.

Do the same for your wxtrends.php page and make sure the date/time at the top is 'current'.

You are also missing some cache files:

forecast.txt
uv-forecast.txt

Create blank files and upload them, then set the permissions to 666 or 777 so they can be written by PHP .. it will speed up the loading of your pages.

Best regards,
Ken

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: MesquiteWx on July 20, 2008, 03:17:52 PM
Hello, I need some help with this. I have read all 5 pages and have done everything listed on here. My site does allow php I run several php apps and have been for years so that isn't an issue. I am on Bluehost if that matters any. I can not get the site to update at all and I have gone all through the settings and the files are being uploaded and everything is set to the best of my knowledge. Where do I need to start looking to feel this out and troubleshoot?

http://www.mesquitechristmas.com/weather/wxindex.php

-Thanks
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on July 20, 2008, 04:17:53 PM
Hi!

I think the first issue is that Weather-Display is not uploading either testtags.txt -> testtags.php nor trends-inc.txt ->trends-inc.html so that will mean the basic weather values (non-AJAXed) are from December, 2007 and my station (I'd included sample files in the distribution so you could load the templates and not get a 'not found' error).

Unpack the two files (trends-inc.txt and testtags.txt) from the WD-webfiles/ directory in the distribution zip, and put them in your c:\wdisplay\webfiles directory.  Then follow the guide in the README.txt in the WD-webfiles/ directory to setting up Weather Display.  You also may need to add a schedule for update using the WD, Control Panel, Internet File Creation/Upload, Setup Page#2 TAB
File #29 Special Custom file convers.

Click on Set, Select Update every 5 minutes, Turn the Use these Settings to ON and press OK

You should then see the testtags.php and trends-inc.html update on your site.
Check it by viewing http://www.mesquitechristmas.com/weather/testtags.php?sce=view and making sure the $time, $date is NOT
Code: [Select]
$time = "9:10 PM"; // current time
$date = "12/22/07"; // current date

Second, you should change ajaxWDwx.js to point to your relative URL location of clientraw.txt.  As distributed, the template expects to be in the document root directory of your website, and you've installed in the /weather/ directory.  So, you should change ajaxWDwx.js to have
Code: [Select]
var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on websiteThis should get you going again.

Best regards,
Ken

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: MesquiteWx on July 20, 2008, 05:16:06 PM
Thanks Ken for your reply. I had done the first part of that already as addressed in other posts. Those files were showing up in my sever so I was assuming they were getting uploaded or overwritten. It was late last night when I was setting this up so I double checked everything you posted and then deleted the old testtags.php and the trends.html. The trends is getting FTP but the testtags isn't. Everything looks the be correct as you explained. Everything is updating not with a couple small issue. I am getting and error because the testtags.php is not getting uploaded and not sure as to why and it gives me errors on the page. Also all the times in the dashboard say 4:00pm for everything. I am going to assume this is from the tags not being uploaded?

-Thanks
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on July 20, 2008, 07:52:58 PM
Correct!  If the testtags.php is not there, you'll get an error message as it's a required file for the template.

Double check your WD setup to make sure that testtags.txt is in the Local filename and testtags.php is in the Remote filename.

Also check to make sure that testtags.txt in c:\wdisplay\webfiles contains actual WD variables (like $time = '%time%'; ) and not a numeric value.  If it contains a time instead of the %time% tag, then replace it with the testtags.txt from the distribution zip file. 

I'm not sure your trends-inc.txt is consistently uploading to trends-inc.html .. It's now 18:51 Central, and your last timestamp shows 20-Jul-2008 at 3:53pm  .

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: MesquiteWx on July 20, 2008, 08:36:56 PM
Double check your WD setup to make sure that testtags.txt is in the Local filename and testtags.php is in the Remote filename.

Yes they are... and the files are in the correct WD folder in the local folder.

Also check to make sure that testtags.txt in c:\wdisplay\webfiles contains actual WD variables (like $time = '%time%'; ) and not a numeric value.  If it contains a time instead of the %time% tag, then replace it with the testtags.txt from the distribution zip file.

Yes, it is correct and contains the correct variable...

Is their some other setting I might be overlooking? I have tripled checked everything and it all seems to be as it is suppose to be.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: MesquiteWx on July 20, 2008, 08:53:16 PM
I think I found my problem because it is working now. I guess I accidentally copied both testtages.txt and.php into the wed/webfiles folder. I just show happened to scroll down in the window and saw it. I deleted it and it is working now.

Two other minor issues though. The heat index is not reporting the correct value and the Tonight and tomorrows forecast is not correct at the bottom. The Davis forecast is right though. Any idea where I can find the settings for those?

-Thanks
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on July 20, 2008, 09:41:45 PM
In your Settings.php, you still have
Code: [Select]
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&TextType=2'; which is the forecast for my site (Saratoga, CA).

You need to change it to
Code: [Select]
$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?CityName=Mesquite&state=TX&site=FWD&textField1=32.769&textField2=-96.5998&TextType=2'; which should be your Mesquite, TX (Dallas County) URL.

When you say 'Heat Index' are you refering to the "Feels like:  94°F " on your wxindex.php page?  There isn't a direct Heat Index display in the template set.

Best regards,
Ken

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: MesquiteWx on July 20, 2008, 11:14:47 PM
Oh yea I forgot about that link. My office is down though so I am unable to get the correct URL for that setting. I used the one you posted but it didn't work so I guess I need to wait it out until they get it fixed so I can get to correct URL.

 I know in the testtags.php I saw a tag for heat index. Would it be possible to switch the feels like tag out with the actually heat index? It was showing over 100 degrees today when it was actually only 104.

One other small issue while I have you, I have changed the header out with an image but it is shifted right. I have played with the CSS and classes and can't get it to slide over. Any ideas of what I could check?

-Thanks
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on July 21, 2008, 12:32:31 AM
WD uses Humidex to set the %feelslike% variable, and I don't know of a way to change that.  The ajaxWDwx.js script uses the same default values (and humidex) to set the conditions color word (same as WD).

You're free to change the code in ajax-dashboard.php and ajaxWDwx.js as you like if you want to include HeatIndex instead .. it's only valid if the temperature is above 80F (according to NOAA).

Your header graphic (http://www.mesquitechristmas.com/weather/images/wxheader.png) is fairly hefty (347.22 KB) -- you should consider resizing it to no more that 780px wide, and switching to jpg or gif to get a much smaller size.  With 780px wide and the 'narrow' css, the image should appear centered as it is.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: MesquiteWx on July 21, 2008, 02:04:11 AM
WD uses Humidex to set the %feelslike% variable, and I don't know of a way to change that.  The ajaxWDwx.js script uses the same default values (and humidex) to set the conditions color word (same as WD).

You're free to change the code in ajax-dashboard.php and ajaxWDwx.js as you like if you want to include HeatIndex instead .. it's only valid if the temperature is above 80F (according to NOAA).

I looked in the ajax-dashboard.php and it looks like the logic is written for Heat Index and Wind Chill. It also looks like it has the color set also like I was wanting to do already. So do you know if their is a way to display the heat index if about 80 and wind chill is lower then 60?

Your header graphic (http://www.mesquitechristmas.com/weather/images/wxheader.png) is fairly hefty (347.22 KB) -- you should consider resizing it to no more that 780px wide, and switching to jpg or gif to get a much smaller size.  With 780px wide and the 'narrow' css, the image should appear centered as it is.

Yea I had it set as a .png because that way I can edit it in Fireworks until I get it how I like it. Once I set it as a .gif. or .jpg then I can't edit it. I can save one of each and then just overwrite the .gif. .jpg as I make changes to the .png but that is a pain. I have it set has a gif now and down to 37 kb so I am good with that now. I set the size to 770px so I can have the red background come through on the edges. Now while that gets it inside the layout now. It still looks like I have a padding or margin issue on the left side. I looked in the CSS and I couldn't find an attribute for it. Do you know if their is one that controls that and maybe I am just overlooking it?

-Thanks
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: MesquiteWx on July 21, 2008, 04:59:42 AM
I fixed the Header image issue that is square. I will keep playing around with the other stuff...

-Thanks
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BayviewBob on October 07, 2008, 10:59:20 PM
Hello all.

I was reading this thread as I too was having the problem of my ajax php templates not using the data from the clientraw.txt file.

The clientraw.txt file is updated every few seconds and the testtags.php and trends-inc.html every five minutes.
These three files are in the same directory as the templates.
The weather data is being updated every five minutes, I assume from the testtags.php?

I have tried all of the infomation in this thread and I still can't get the darn thing to work.

So if anyone would like to take a look and give me some well needed advice, I would appreciate it greatly.

The site is http://www.bayview-idaho.com/weather/index.php

Thanks
Bob

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on October 07, 2008, 11:43:28 PM
If what you have not working is the AJAX update, then you just need to change ajaxWDwx.js to have
Code: [Select]
var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on website
I've found that installations in other than the document root directory of the website need the absolute URL path for clientraw.txt in the javascript.

Your testtags.php and trends-inc.html are both uploading fine AFAIK.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on October 07, 2008, 11:50:26 PM
You'll need to change your Settings.php from
Code: [Select]
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&amp;smap=1&amp;textField1=37.26389&amp;textField2=-122.02194&amp;TextType=2'; to
Code: [Select]
$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?site=mtr&amp;smap=1&amp;textField1=37.26389&amp;textField2=-122.02194&amp;TextType=2'; in order to get your Point-printable forecast back.. the WRH website was recently change to redirect to the forecast.weather.gov site for the details.

Also, you should run WU-radar-testpage.php?show=loc and do a position reset on the area maps (reset the $CityLocN values) for $CityLoc4 through $CityLoc9 .. Bayview appears in the Pacific Ocean :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BayviewBob on October 08, 2008, 09:18:15 AM
I made two of the  changes. I had tried the absolute path for clientraw.txt but is still doesn't work. :(

I will fix the radar postion reset tonight.
Any other ideas?

http://www.bayview-idaho.com/weather/index.php

Thanks again,
Bob
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on October 08, 2008, 10:43:33 AM
Last change.. in ajaxWDwx.js change
Code: [Select]
var ajaxLoaderInBody = true; // set to true if you have <body onload="ajaxLoader(..." to
Code: [Select]
var ajaxLoaderInBody = false; // set to true if you have <body onload="ajaxLoader(..."
The template set doesn't use <body onload="ajaxloader... so the script is never started with the ajaxLoaderInBody=true

Leave the
Code: [Select]
var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on website
in place .. it will ensure the clientraw.txt file will be found :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BayviewBob on October 08, 2008, 11:35:50 AM
Right on, Red Rider!

I changed that to true while I was messing around and forgot to changed it back :( I hate myself sometimes )

Of course now the the clientraw path is right and that is set back to false and everything works like it is supposed to.!

Now I can customize ( after making all the backups of course! )

Thanks a bunch.
You the Man!

Bob
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on October 08, 2008, 02:43:08 PM
You're welcome Bob!

I'll add your site to the list of template sites :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BayviewBob on October 09, 2008, 12:37:10 AM
You'll need to change your Settings.php from
Code: [Select]
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&amp;smap=1&amp;textField1=37.26389&amp;textField2=-122.02194&amp;TextType=2'; to
Code: [Select]
$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?site=mtr&amp;smap=1&amp;textField1=37.26389&amp;textField2=-122.02194&amp;TextType=2'; in order to get your Point-printable forecast back.. the WRH website was recently change to redirect to the forecast.weather.gov site for the details.


Best regards,
Ken


Now I get no weather forecast at all. I thought it was working before.

?
Bob
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on October 09, 2008, 01:10:12 AM
Actually, the URL was for MY site, not yours in Bayview, ID

Try
Code: [Select]
$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?CityName=Bayview&state=ID&site=OTX&textField1=47.9803&textField2=-116.559&e=0&TextType=2'; to replace the one that's in your Settings.php

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BayviewBob on October 09, 2008, 10:15:36 AM
That did the trick!
Thanks, once again.

Bob
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BayviewBob on October 09, 2008, 10:30:43 PM
You'll need to change your Settings.php from
Code: [Select]
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&amp;smap=1&amp;textField1=37.26389&amp;textField2=-122.02194&amp;TextType=2'; to
Code: [Select]
$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?site=mtr&amp;smap=1&amp;textField1=37.26389&amp;textField2=-122.02194&amp;TextType=2'; in order to get your Point-printable forecast back.. the WRH website was recently change to redirect to the forecast.weather.gov site for the details.

Also, you should run WU-radar-testpage.php?show=loc and do a position reset on the area maps (reset the $CityLocN values) for $CityLoc4 through $CityLoc9 .. Bayview appears in the Pacific Ocean :)

Best regards,
Ken


I have done the position reset on $CityLoc4 -9.

How can I do the same for $CityLoc1 -3 ? It puts me off about 30 or 40 miles lol
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on October 10, 2008, 01:20:27 PM
Use the same method (edit WU-radar-inc.php while viewing WU-radar-testpage.php?show=loc )

Just click the links for $CityLoc1 through $CityLoc3 and copy the new values into WU-radar-inc.php

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: BayviewBob on October 10, 2008, 01:43:06 PM
I tried that and it doesn't work.

I get a black screen with the words "Radar down for maintenance" every time.

Bob
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on October 10, 2008, 04:54:07 PM
I think the issue is you have
Code: [Select]
$RDR  = 'TOX';  // last 3 characters of NOAA Radar Site Name in WU-radar-inc.php and should have
Code: [Select]
$RDR  = 'OTX';  // last 3 characters of NOAA Radar Site Name since your $MesoURL and $CityURL use 'OTX' as the site. 
Code: [Select]
// $CityPos1 - for City Level radar/animation
$CityPos1  =  'left: 389px; top: -254px;';
$CityColor1 = '#FFFFFF';  // color of legend display
// see instructions above to set  $CityURL value
$CityURL = 'http://radblast-mi.wunderground.com/cgi-bin/radar/WUNIDS_map?station=OTX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=1.000&noclutter=1&t=1223606190&lat=47.98235321&lon=-116.56307220&label=Bayview%2C+ID&showstorms=0&map.x=400&map.y=240&centerx=400&centery=240&transx=0&transy=0&showlabels=0&severe=0&rainsnow=0&lightning=1&smooth=0';

// $CityPos2 - for Metro Level radar/animation
$CityPos2  =  'left: 394px; top: -260px;';
$CityColor2 = '#FFFFFF';  // color of legend display
// see instructions above to set  $MetroURL value
$MetroURL = 'http://radblast-mi.wunderground.com/cgi-bin/radar/WUNIDS_map?station=OTX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=1.000&noclutter=1&t=1223606190&lat=47.98235321&lon=-116.56307220&label=Bayview%2C+ID&showstorms=0&map.x=400&map.y=240&centerx=400&centery=240&transx=0&transy=0&showlabels=0&severe=0&rainsnow=0&lightning=1&smooth=0';


// $CityPos3 - for unzoomed radar/animation
$CityPos3  =  'left: 386px; top: -262px;';
$CityColor3 = '#FFFFFF';  // color of legend display


When you use WU-radar-testpage.php?show=loc to do the adjustments, none of the settings inside of Settings.php are used .. the script is 'standalone' and needs to be configured, and when finished, copy the corresponding settings values back into Settings.php.  Correct the $RDR setting in WU-radar-inc.php and I think you'll have better luck with the configuration for $CityLoc1 ... $CityLoc3 :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: rikostan on November 01, 2008, 02:09:38 PM
Afternoon all. I am having an issue here. I bet it is something I did, but I can't figure out what it is.
http://rikostan.com/weather/wxindex.php
The time is way off. It is showing data from 6 o clock this morning. and doesn't change. yesterday it showed the date as the 31 of December, 1969. As least the date is right today.
For the TZ setting I used
 $SITE['tz']          = 'America/New_York';  Is that correct? I didn't really understand the ourTZ TZ instructions.

I am just getting going with this, but the work already done by you guys (especially you Ken) is simply awesome. It really lets us hit the ground running.



Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on November 01, 2008, 02:38:24 PM
I think the issue is with your WD setting for the date format .. it looks like it's set for the Euro format of dd/mm/yyyy instead of the USA format of mm/dd/yyyy.   Your Settings.php has
Code: [Select]
$SITE['WDdateMDY'] = true; so it's expecting to see (and process the dates in mm/dd/yyyy format).   Change your WD, Units and Other Settings TAB to have Web Page Settings of Date Format month/day/year (instead of your current day/month/year).

Your timezone setting should work fine with the specification you showed above.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: rikostan on November 01, 2008, 05:43:54 PM
Arrrgh. I KNEW it was going to be something silly.

What is the proper path  in the ajaxWDwx.js file for the clientraw.txt file? They are both in the located in the same folder.
They are in ./weather/ .

Is it just ./clientraw.txt ? if I change it in the ajax file, should I also change it in the settings.file?

Thanks for the help!
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on November 01, 2008, 06:11:32 PM
In the AJAX script (ajaxWDwx.js) you should have the
Code: [Select]
var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on website .. the JavaScript uses the absolute URL path to find the clientraw.txt file.  The Settings.php
Code: [Select]
$SITE['clientrawfile'] = './clientraw.txt';  // relative FILE location of clientraw.txt works just fine as long as you're uploading clientraw.txt to the same directory as the template set.  It uses relative path FILE addressing for PHP (as PHP really only knows about the filesystem on the webserver, while JavaScript only knows about the URL paths on the webserver).
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: rikostan on November 01, 2008, 07:12:20 PM
All set! Thanks to you, the bones are in place, now I can start working on making it mine.

Thanks for your help and the awesome work you did on the script.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on November 01, 2008, 07:18:01 PM
You're very welcome!  I hope you enjoy the customization and presentation on your weather website.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: CNYWeather on November 02, 2008, 09:01:31 AM
All set! Thanks to you, the bones are in place, now I can start working on making it mine.

Thanks for your help and the awesome work you did on the script.

Didnt realize you're up in prime Lake Effect country. Not sure, but
I may pass through there on my way to Clarkson to see the daughter.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: rikostan on November 02, 2008, 09:09:48 AM
We are right on the edge of that plateau that gets smacked every year. So we do get hit heavier than most other places, but starting 15 miles north east of us is the second snowiest spot in the lower 48.

We just bought a house on east bay though... should be a pretty interesting spot! :) We are two houses from the bay and 4 houses from lake Ontario.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: CNYWeather on November 04, 2008, 04:53:18 PM
I'll see if I can give you a run for your money this season.
Lakes are kinda warm for this time of year I believe, and
you know what that means, right? LOL
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: rikostan on November 04, 2008, 06:06:16 PM
Oh yeah...snow baby!

Good thing I have 4wd. My wife quits her job in Rochester at the end of the year too, hopefully the heavy stuff holds off until mid-January or so. I hate to think of her driving that 45 miles to work on 104. I used to work up there too. When we drove together it wasn't so bad, but her being alone bothers me.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: Gregal on December 14, 2008, 09:05:01 PM
I am trying to set up the flyout-menu on my web pages

I have enabled the $SITE['flyoutmenu'] = true; in the settings file
I have uploaded the new image folder
I have uploaded the the 3 flyout-menu files
I can see the flyout-menu.php file fine at http://www.allshouse.net/flyout-menu.php
When I go to my main website http://www.allshouse.net/wx.php the flyout menu is not present

Any ideas what I might have wrong?
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 15, 2008, 11:13:08 AM
Does your top.php have this at the end of the file?
Code: [Select]
<?php

if( isset ($TITLE) ) {
echo "    <title>" $TITLE "</title>\n";
} else {
echo "    <title>" $SITE['organ'] . "</title>\n";
}

if (isset(
$SITE['flyoutmenu']) and $SITE['flyoutmenu'] or
isset($_REQUEST['menu']) and strtolower($_REQUEST['menu']) == 'test' ) {
  
$SITE['flyoutmenu'] = true;
  
$PrintFlyoutMenu false;
  
$genDiv =false;
  global 
$FlyoutCSS$FlyoutMenuText;
  include_once(
'flyout-menu.php');
  print 
$FlyoutCSS;
}

?>

<!-- WD-USA template from http://saratoga-weather.org/ -->
<!-- end of top -->

It looks like the flyout-menu.php isn't being included while top.php is running, and that's why the menu shows blank in the page.

Best regards,
Ken
Title: New User questions
Post by: muchgooder.com on December 17, 2008, 02:18:13 PM
I am a lotus domino developer and I recently stumbled across this tremendous software package.  I had hoped to post here earlier but I wanted to figure out a way to run PHP with domino and I (hopefully) have that out of the way.

I do have a couple of newbie questions. 

1)  I'd like to point this software to my own weather station (OS WMR968).  Do I have to have a package such as Weather Display to produce the clientraw.txt file?  I currently run Virtual Weather Station but I didn't see an option in there to produce such a file.  I am not familar with Weather Display so I'm not sure if that file is specific to that product.

2)  Is there a trick to putting this code in a subdirectory?  I did see a page on the site that said that various settings will need to be tweaked.  I've modified some of the pathing in the setting file to reflect the directory change but that hasn't helped.  Any pointers would be greatly appreciated.

Here's what I'm working on:  http://www.muchgooder.com/php-bin/weather/WD/wxforecast.php
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 17, 2008, 03:16:05 PM
Thanks for the kind words about the WD/AJAX/PHP template set :)

At present, the template set only works with data uploaded by Weather-Display software.  It uses a pair of files with WD-specific tags in them to produce the majority of the weather variable displays.  It uses the Weather-Display realtime file (clientraw.txt) to provide AJAX updates to the dashboard (main page) and gizmo (all other pages) using a JavaScript.  It also relies on Weather-Display to provide dates for astronomical events (wxastronomy.php page) and other graphs.
So.. the short answer is, Yes, you'll need to use Weather-Display software to process the station's data to drive the template set.

As to subdirectory location of the template, it's a bit tricky since some of the scripts rely on having the relative FILE address and relative URL address having a common path (with the relative URL address being a proper ending subset of the full FILE address on the webserver.  I'm not sure how a Lotus Domino server does the mapping, so I'm not sure what to advise you on changing to make it run.  The expected directory structure (matching the FILE structure from the document root of the website) looks like this:

/    - has all the PHP, JS, .TXT, .CSS files from the distribution
/forecast/images - has the Carterlake-icons set of .jpg images for the forecasts
/ajax-images - has the current conditions, wind-rose, arrows images

Hope this helps...
Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 17, 2008, 04:15:34 PM
On reflection, it is possible to let the template work with VWS, but it involves a bunch of code changes.

First, the testtags.txt file would need to be changed to substitute VWS ^variables^ for the %WDtags% used, and since VWS doesn't produce many of the tags (like conditions 1 hour ago, astronomical dates, etc.), some pages like wxtrends.php and wxastronomy.php would need to be omitted from the site.

The ajaxVWSwxf.js script (AJAX using WeatherFlash) could be substituted for the ajaxWDwx.js (Weather-Display) script as the ajax.... names are compatible (I think :) ) for the most part.

The ajax-dashboard.php and ajax-gizmo.php would need a bit of rewrite to omit values not supported by VWS.

It's a fairly big project... but it could be done.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on December 18, 2008, 08:22:58 PM
Hello again Ken. I just recently discovered what seems to be a minor glitch, I think. I noticed that on the forcast page and also the main page when the forcast calls for a negative number, it instead shows n/a. I have only had this running since April so this is the first time the forcast has called for negative numbers. Is this something I did or did not do, or is it a simple glitch that can be easily fixed?
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 19, 2008, 11:43:19 AM
I think the issue is that you're using the old www.wrh.noaa.gov site for your forecast .. you need to change Settings.php from
Code: [Select]
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=PIH&amp;llon=-113.336247&amp;rlon=-111.768747&amp;tlat=43.722084&amp;blat=42.154584&amp;smap=1&amp;mp=0&amp;map.x=132&amp;map.y=73&amp;TextType=2'; to
Code: [Select]
$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?CityName=Blackfoot&state=ID&site=PIH&textField1=43.1906&textField2=-112.344&e=0&TextType=2'; then your point-printable forecast will be returned.  Right now, it's failing over to the Zone forecast due to the old URL in the Settings.php.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on December 19, 2008, 02:45:48 PM
I changed what you posted, but I do not see a difference. The negative values are still not diplayed. I also just noticed that since I changed this, the forcast seems to be a day behind now.

EDIT: Ok, I tried this
Code: [Select]
http://forecast.weather.gov/MapClick.php?site=PIH&llon=-113.336247&rlon=-111.768747&tlat=43.722084&blat=42.154584&smap=1&mp=0&marine=0&map.x=132&map.y=72&TextType=2 since this is my pin point forcast area from the clickable forcast map. Seems to be working now.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 19, 2008, 03:17:20 PM
You probably just had to wait for the cache to expire and a fresh copy to be fetched with the new URL for it to work correctly.

Yes, your site is now showing the point forecast for '10 Miles WNW Blackfoot ID' instead of the Zone forecast.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on December 19, 2008, 03:20:46 PM
Thanks Ken, it is so nice to have a program work correctly and if there is a problem, you are always there for the support. Does not get any better. Great job.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: muchgooder.com on December 19, 2008, 10:08:55 PM
On reflection, it is possible to let the template work with VWS, but it involves a bunch of code changes.

First, the testtags.txt file would need to be changed to substitute VWS ^variables^ for the %WDtags% used, and since VWS doesn't produce many of the tags (like conditions 1 hour ago, astronomical dates, etc.), some pages like wxtrends.php and wxastronomy.php would need to be omitted from the site.

The ajaxVWSwxf.js script (AJAX using WeatherFlash) could be substituted for the ajaxWDwx.js (Weather-Display) script as the ajax.... names are compatible (I think :) ) for the most part.

The ajax-dashboard.php and ajax-gizmo.php would need a bit of rewrite to omit values not supported by VWS.

It's a fairly big project... but it could be done.

Best regards,
Ken


Thanks again Ken!  I'm making progress.  Can you help me with one more thing that is probably really really stupid?  I can't get it to pick up the values of my clientraw.txt.  When I go to the parse page things look pretty good:

http://www.tnetweather.com/wd-parser.php?site=http%3A%2F%2Fwww.muchgooder.com%2Fphp-bin%2Fweather%2Fwd#Clientraw.txt

But on my site it still picks up some kind of default value.

http://www.muchgooder.com/php-bin/weather/wd/wxindex.php

my clientraw.txt is in /php-bin/weather/wd/ off of the site's root. I've tried every combination to try to get this working.  Can you point me in the right direction?

(and thanks again for all of your hard work - I just made a donation to support your efforts)
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: CNYWeather on December 19, 2008, 10:39:33 PM
Check your Settings.php to see if it points to your clientraw.txt file like mine does


#############################################
$SITE['flyoutmenu'] = true; // set to false to use classic menubar.php instead

$SITE['clientrawfile']   = 'http://www.cnyweather.com/weather/clientraw.txt';  // relative FILE location of clientraw.txt

# Configurable Carterlake/WD/PHP template Site Settings
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 20, 2008, 12:10:02 AM
For the Settings.php I'd suggest
Code: [Select]
$SITE['clientrawfile'] = 'clientraw.txt'; assuming the entire template is in the same directory.  For the AJAX script (ajaxWDwx.js), you should have
Code: [Select]
var clientrawFile = '/php-bin/weather/wd/clientraw.txt'; as the AJAX script needs the full URL path to the clientraw.txt file from the document root of the website.

Thanks for the donation!!

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: muchgooder.com on December 21, 2008, 11:28:44 AM
Thanks again Ken!  You were right, I had missed that setting.  One final question, I hope.  My weather station data populates just fine on the initial load but never again.  I see in the JS that the default is set to run every 5 seconds and I have not touched that.  Any ideas?
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 21, 2008, 12:36:29 PM
I see you're making good progress in getting the WD template set up.  Just a few more items:

1) you need to upload the ajax-images directory (so it appears as http://www.muchgooder.com/php-bin/weather/wd/ajax-images/
2) you need to upload the carterlake-icons.zip (so it appears as http://www.muchgooder.com/php-bin/weather/wd/forecast/images/
3) your trends-inc.html file is missing (should appear as http://www.muchgooder.com/php-bin/weather/wd/trends-inc.html ) so your wxtrends.php page is missing data.
4) your testtags.php (which has the bulk of the php readible weather data) appears with the wrong date/time (about a year and 1.5 day behind)
http://www.muchgooder.com/php-bin/weather/wd/testtags.php?sce=view shows the last update date as
$time = "9:10 PM";   // current time
$date = "12/22/07";   // current date

but it's 12:33 PM (Eastern) on 12/21/08

Try using the instructions in the WD-webfiles/README.txt in the distribution .zip file to set up testtags.php and trends-inc.html uploads via Weather-Display.

The PHP page itself can refresh if you add to top.php
Code: [Select]
<meta http-equiv="Refresh" content="300" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
which will cause the browser to reload the page at 5 minute intervals.

Keep up your pioneering work.. you're the first one to try the template on a Domino webserver :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on December 21, 2008, 03:10:25 PM
Ken, is there a way to add the NOAA warning beeps like on the radio to rss-top-warning when a warning/watch is active? Just something I have been thinking about for a while to make the warning/watches more noticable. Just something that beeps when the main index page is loaded the first time when advisories are active.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 21, 2008, 04:42:46 PM
It's possible, but not necessarily desirable.  Many folks hate having audio launch from their speakers as they visit a website.

Here's several solutions that would enable it ( http://www.scriptwell.net/howtoplaysound.htm ), and you'd have to
a) generate a sound file with appropriate alarm
b) modifiy the rss-top-warning.php file to emit the <object> code to play the sound in (a) when the warning is 'severe enough'.

Personally, I only visit a site once that has unrequested audio on it :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: muchgooder.com on December 21, 2008, 05:40:27 PM
Thanks Ken.  I should have mentioned that I'm trying to transition from VWS to Weather Display as my data collector.  I had it off for much of the day yesterday and today.  I clearly don't have WD set up correctly yet - it isn't the most intuitive program to use (although I like the flexibility).  It doesn't seem like the clientraw is ever updated again so I'm going back through the instructions.

I should have been a little clearer about one of my questions.  I'm trying to figure out why the real-time updater (ajax, I assume) is loading once with the page and then doesn't make a call back to the server ("updated x seconds ago").
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 21, 2008, 06:00:10 PM
I think your http://www.muchgooder.com/php-bin/weather/WD/clientraw.txt (which is correctly specified in ajaxWDwx.js as
Code: [Select]
var clientrawFile = '/php-bin/weather/wd/clientraw.txt'; // location of clientraw.txt relative to this page on website is just not updating by WD.. the last update date/time was 12/19/2008 at 9:57:00_PM

Check your WD to make sure the yellow icon in the taskbar is updating your realtime conditions.

The AJAX script is loading conditions, they just aren't changing since the clientraw.txt isn't being updated by WD.

BTW, you can run WD and VWS concurrently with a Davis VP system using the great VirtualVP software from http://www.softwx.com/weather/virtualvp.html -- I use it to run WeatherLink, Weather-Display and VWS concurrently :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: muchgooder.com on December 21, 2008, 07:28:14 PM
Thanks again Ken.  I think that there is in fact an issue with the communication between WD and my OS WMR968 (serial port).  It appears as though the clientraw.txt is being updated now but the stats never change.  Any idea as to what may be causing this?  You mentioned that there could be an issue with testtags but it would seem like this is an issue with the setup since the stats are wrong in the gui.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: CNYWeather on December 21, 2008, 07:45:11 PM
I see you've got the 5 second updates working.

There are 2 folders of images which will fill in the
windrose, up/down arrows and current conditions

ajax-images
ajax-images-original

Looking good!

Enjoying the lake effect way over there?  :-)
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: muchgooder.com on December 21, 2008, 07:53:02 PM
(laughing) oh yeah, the snow has been tremendous this weekend.  Thankfully I'm just north of the snow band (near Niagara Falls) so I was spared most of what is going on just a little bit south of here.

Thanks for the reminder about the directory - I think I have that working right.  I'm struggling to figure out why the stats aren't updating in the gui.  Like i said earlier, VWS was a bit easier to set up but I look forward to learning the ins and outs of WD.

*EDIT* I think the issue is that I had the data logger set to pick up values on load of the program.   

Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: CNYWeather on December 22, 2008, 07:57:20 AM
Those stats will be from your testtags.php file. Looks like it
hasnt updated since 5:05pm

http://www.muchgooder.com/php-bin/weather/wd/testtags.php?sce=view

Ken explains it much easier than I ever could:

These two files

testtags.txt
trends-inc.txt

need to be placed in your Weather-Display \webfiles directory.

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

In the 'Special file conversion' area

put:  trends-inc.txt     in local file 1
      trends-inc.html    in Remote file name 1

      testtags.txt       in Local File 2
      testtags.php       in Remote file name 2

Turn the switch to ON

Press Test

Press OK to save the settings.

THESE FILES ARE REQUIRED for proper operation of the weather website.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: muchgooder.com on December 26, 2008, 12:01:33 PM
Hey Ken, I hope you had a nice Christmas.  A slow day at work means more fun with the weather scripts.

I've managed to clean up my installation and things are starting to look good.  I do have a couple of questions:

1)  On the local radar page, do you have any idea why the links on the radar map go to the wrong target?  Once again, I have a unique setup.  All of my php files need to be in a different path than the css, images, etc.  I'm assuming that wherever these links are defined I may need to modify some pathing.

2)  On my personal homepage (also served from my home server) I'd like to be able to display the current temperature from clientraw.txt.  Would you be so kind as to point me to pinpoint exactly which resources I might need to get this done?  I'm slowly starting to understand this whole setup but i haven't quite figured out how to extract that piece of the pie.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on December 26, 2008, 10:34:02 PM
Thanks, it was a nice Christmas .. low key this year as son (28) had to work, daughter/husband and kids in Wisconsin with his parents, so just MIL, DW and me.  We had Christmas dinner at a friend's house, so DW was spared the (generally obligatory) big-Christmas-dinner prep. 

The local radar page uses WU-radar-inc.php as it's main source, and you should use the WU-radar-testpage.php and the instructions at http://saratoga-weather.com/scripts-WUradar.php#WUradar to set up your $CityLoc1...$CityLoc9 positions, along with your major URLs for the Metro and City level views.   Make it work correctly while viewing WU-radar-testpage.php by changing settings inside of WU-radar-inc.php, then copy SOME of the settings back into Settings.php to complete installation.

The weather data is available in two places .. for PHP, it's inside of the testtags.php uploaded by WD, and if you include() that file into your home page, then just <?php echo $temperature; ?> will print it.  The data is also in the clientraw.txt file, and you can use the ajaxWDwx.js script to fetch it and update your page's <span class="ajax" id="ajaxtemp"></span> with the current temperature.  Just include the JavaScript in your home page and change your page's markup to have it display on your home page.

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on January 10, 2009, 07:10:12 PM
Hey Ken, I seem to have a problem that I can not seem to solve. Some pages that I have added work fine in normal screen, but in wide screen, the background I believe seems to do some weird things. Could you check it out and see what I am doing wrong? Here are a couple pages that have the problem.

http://myidahoweather.com/wxsystemreport.php (http://myidahoweather.com/wxsystemreport.php)
http://myidahoweather.com/NOAAreport.php (http://myidahoweather.com/NOAAreport.php)
http://myidahoweather.com/wxlinks.php (http://myidahoweather.com/wxlinks.php)
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on January 10, 2009, 08:34:16 PM
I'm not sure what you mean with the wide-screen weird things ???

When the screen goes to wide, it removes the black background around the 800px template and expands to fill the screen (as expected).

I do see that there are some HTML validation errors (like the use of <center></center> [not in XHTML) and <br> instead of <br/> and <img...> instead of <img ... /> .. 

Did you adjust the weather-screen-black-wide.css ?

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on January 10, 2009, 08:38:10 PM
I did not edit the weather-screen-black-wide.css.

When I use wide screen the background seems to split to different colors (black or grey) depending on where I have the page scrolled to.

Did the pages look ok to you besides the errors?
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on January 10, 2009, 09:03:04 PM
Yes, they all looked the same in FF3 with either wide or narrow mode.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on January 10, 2009, 09:07:41 PM
I wonder why they look different on my wide screen.
Here is a few screen shots to look at.


http://myidahoweather.com/VIDEOS/normal%20screen.jpg (http://myidahoweather.com/VIDEOS/normal%20screen.jpg)  Normal screen, this page is ok.
http://myidahoweather.com/VIDEOS/widescreenunscrolled.jpg (http://myidahoweather.com/VIDEOS/widescreenunscrolled.jpg) Wide screen, not scrolled down, notice grey background
http://myidahoweather.com/VIDEOS/widesreenscrolleddown.jpg (http://myidahoweather.com/VIDEOS/widesreenscrolleddown.jpg) Wide screen, scrolled down, notice grey is gone.
http://myidahoweather.com/VIDEOS/widescreenstormreport.jpg (http://myidahoweather.com/VIDEOS/widescreenstormreport.jpg) Wide screen, scrolled down, notice black line across the bottom. It goes away when you scroll up, comes back when you scroll down.

I guess if they are looking ok to you, and nobody has complained, it may just be my screen doing it.
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: saratogaWX on January 10, 2009, 09:14:00 PM
You're using IE and it's possibly more sensitive to HTML issues .. try working on your validation errata (starting at the first one, then rechecking).  When the HTML validates, then see if the the IE viewing issue is still there :)

Best regards,
Ken
Title: Re: Weather-Display Carterlake-style AJAX/PHP website templates available
Post by: prvrt on January 11, 2009, 04:34:21 PM
Ken,
I narrowed down the problem to the length of the menubar versus the top of the footer. If the top of the footer is = to or above the bottom of the menubar, then the background changes depending on where I put my mouse or scroll the page. This seems to only happen on the wide screen setting. As long as the top of the footer is below the last thing in the menubar, everything works fine. I noticed this because only the pages that were short had the problems. I added some <br/> in the main body of the short pages to make them longer to fix the problem for now. I will do some more snooping around in a while.