USA Demo | Canada Demo | World 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) |
I find this thread with PHP
$SITE['flyoutmenu'] = true; // set to false to use classic menubar.php instead
$BlankGraphic = './thermometer-blank.png'; // relative file address for thermometer blank image PNG
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
$BlankGraphic = './thermometer-blank.png'; // relative file address for thermometer blank image PNG
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
Hmmmmm.....looks like we need Ken's help here! It's got me stumped! I'll send him an e-mail for help!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?
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 used America/Boise. Is this the correct format?
QuoteI 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.....?
$Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. \n";
$Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. --> \n";
There is a bug in rss-top-warning.php - V1.02 25-Mar-2008
on
Line 149
changeCode: [Select]$Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. \n";
toCode: [Select]$Status .= "<!-- HTML fetch length = " . strlen($html) . " ; Cache not saved. --> \n";
That is causing your index page to half load
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.
QuoteYes, 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.
if( ! function_exists("gd_info")){
die("Sorry.. this script requires the GD library in PHP to function.");
}
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.");
}
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
ChangeCode: [Select]if( ! function_exists("gd_info")){
die("Sorry.. this script requires the GD library in PHP to function.");
}
toCode: [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.
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)
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
There was no forecast.txt on the server, so I created a blank. It has full permission.
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.
I am running out of help for ISS issues, I only use Apache, sorry.
<!-- Network error: () -->
in the pages that use the function (forecast, advisory, earthquake, etc) all complain the same.<!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.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.Including the (hastily added)
safe_mode = off;
?
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.
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.
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
$SITE['flyoutmenu'] = true;
To enable the flyout-menu, you'll need to change your Settings.php to haveCode: [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
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
$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.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 thatCode: [Select]$time = "9:10 PM"; // current time
have changed to your current date/time. That indicates the upload was successful.
$date = "12/22/07"; // current date
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
$time = "9:10 PM"; // current time
$date = "12/22/07"; // current date
var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on website
This should get you going again.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.
$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).$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.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.
var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on website
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&TextType=2';
to$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&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.var ajaxLoaderInBody = true; // set to true if you have <body onload="ajaxLoader(..."
to var ajaxLoaderInBody = false; // set to true if you have <body onload="ajaxLoader(..."
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 :)You'll need to change your Settings.php fromCode: [Select]$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&TextType=2';
toCode: [Select]$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&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
$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.phpYou'll need to change your Settings.php fromCode: [Select]$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&TextType=2';
toCode: [Select]$SITE['fcsturlNWS'] = 'http://forecast.weather.gov/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&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
$RDR = 'TOX'; // last 3 characters of NOAA Radar Site Name
in WU-radar-inc.php and should have $RDR = 'OTX'; // last 3 characters of NOAA Radar Site Name
since your $MesoURL and $CityURL use 'OTX' as the site. // $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¢erx=400¢ery=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¢erx=400¢ery=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
$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).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 $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).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.
<?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 -->
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=PIH&llon=-113.336247&rlon=-111.768747&tlat=43.722084&blat=42.154584&smap=1&mp=0&map.x=132&map.y=73&TextType=2';
to $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.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.
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
$SITE['clientrawfile'] = 'clientraw.txt';
assuming the entire template is in the same directory. For the AJAX script (ajaxWDwx.js), you should have 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.<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.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