WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: gwwilk on August 12, 2015, 02:14:03 PM

Title: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 12, 2015, 02:14:03 PM
This script has been substantially rewritten.  Therefore the old thread has been closed.  The contents of the new 'wxusradars-hanis.txt' readme file is as follows:

This project derives from my GRLevel3 HAniS scripts, and follows the same outlines. It was made possible because of Tom Whittaker's excellent javascript 'HAniS' HTML5 Animation Script which he has so kindly shared with all.

-- CAUTION --
Please read this entire document and carefully follow the instructions before you install this package on your website.

-- FILE LIST ---
Version 20120812 Files Included:
  i)    wxusradars-hanis.php
  ii)   inc-wxusradars-hanis.php.
  iii)   wxusradar-hanis-iframe.php
  iv)      wxusradars-hanis.txt (this file)
  v)      phptest.php
  vi)      /HAniS/hanis_min.js
  vii)   radar-status-getradar.php

The /HAniS directory should be copied to your site's root, if it isn't already present. If it is already present on your site you may safely delete 'hanis.js' from there. Only '/HAniS/hanis_min.js' is required to run this HAniS-dependent script.

-- SETTINGS --
You should edit the Settings in 'wxusradars-hanis.php'. If you want to hide the Auto Refresh capabilities of the script, set '$autoRefresn = false'. When 'autoRefresh = false' the manual 'Refresh' button must be used to refresh the radar display.

The 'autoRefreshOff' Setting determines the default AutoRefresh Setting, 'ON' or 'OFF'.  Turning the default AutoRefresh 'OFF' by Setting '$autoRefreshOff = true;' prevents casual users from loading the page and forgetting it while AutoRefresh is 'ON'.

Settings now include:
/************************* Settings *****************************/
$radar = 'N0R'; // Default radar type is set here
$radarLoc = 'oax'; // IMPORTAMT!!! Default radar location is set here
$imageWidth = 600; // Width of radar images
$iframeWidth = 617; // Default IFrame Width -- adjust as needed
$iframeHeight = 620; // Default IFrame Height -- adjust as needed
$autoRefresh = true; // Use Autorefresh? true or false -- Determines whether AutoRefresh even appears
$autoRefreshTime = 8; // Number of minutes between autorefreshes.  IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!!
$autoRefreshOff = true; // Begin with Autorefresh Off? true or false -- 'OFF' or 'ON"
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'mediumblue'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
/*********************** End Settings ***************************/
These are the defaults for 'wxusradars-hanis.php'.

Change '$radarLoc' to your preferred WFO, and edit anything else to your liking.  You shouldn't need to touch '$imageWidth', '$iframeWidth, or '$iframeHeight'.

When changing any of the '$bgndColor', '$btnColor', or '$btnTextColor' variables only HTML Color Names are passed to 'wxusradar-hanis-iframe.php'. Therefore hex colors, e.g. #0000CC, will show up on the first row of buttons, but not the second. Another option would be to use RGB colors. The legal color names are listed at http://www.w3schools.com/html/html_colornames.asp

The '$autoRefreshTime' allows users to increase the frequency of AutoRefreshes when their radar of interest is updating more frequently because of local weather activity. The longest interval between NWS Ridge Radar updates is 10 minutes, but longer intervals may be selected when the weather is uneventful.  The NWS states that a 4 minute Ridge Radar update is the minimum, but I have observed updates just a minute apart on the Legend.

-- INSTALLATION --
After reviewing and changing the Settings, upload all five scripts to your site along with the /HAniS directory, and add 'wxusradars-hanis.php' to your site's menu. If your site has 'wxusradars-select-hanis.php', you may delete it.  The functionality of this file has been added to 'inc-wxusradars-hanis.php'. As another benefit of this change, editing of 'selected="selected"' is no longer required.

The main file, 'wxusradars-hanis.php', now includes a Stand-Alone option with '$standalone = false' as the default for Saratoga template use.  When '$standalone = true' the script runs outside the Saratoga template.  You could save a script thus modified as 'wxusradars-hanis-SA.php' or some such.

All of the selectors use the same button color options as HAniS and are the same color as the radar control buttons.  The AutoRefresh and Refresh Interval selectors are found inline with the other selectors above the radar location and type.  This was necessary because during a (auto)refresh the entire 'inc-wxradars-hanis.php' must be reloaded so the correct variable parameters are active in order to avoid browser caching of directories.

-- LIMITATIONS --
The included 'phptest.php' will, when run, list all of the important Settings of your webhost's PHP, including PHP version and most importantly whether 'allow_url_fopen' is 'on'.  If it is 'off', the script will fail because it will be unable to get the directory file listings from 'http://radar.weather.gov/ridge' due to strict javascript cross-domain limitations. If 'allow_url_fopen' is 'off', the static map, county, highway, river, and city overlays will show up and be selectable, but no dynamic radar, warnings, or legend layers will appear. You will just see a static map.

If you encounter this condition, you or your webhost's administrators will need to edit your site's 'php.ini' to read 'allow_url_fopen = on'. While running your site with 'allow_url_fopen' 'on' represents a slightly greater security risk, unless your site's users enter their sensitive information such as credit card or social security numbers, this risk should be minimal.  This script contains no user input, so risks from it should be nil.  You should evaluate the remainder of scripts on your web site to determine if they present a significant risk with 'allow_url_fopen' 'on'.

An alternative approach to turning 'allow_url_fopen' 'on' would be to forego AutoRefresh by Setting 'autoRefresh = false;' thus turning off the display of any AutoRefresh options. Then where another site has 'allow_url_fopen' 'on' you would need to point your <iframe> at that site's 'wxusradar-hanis-iframe.php' in 'inc-wxusradars-hanis.php' by changing 'src="./wxusradar-hanis-iframe.php' to, for example, 'src="http://www.gwwilkins/wxusradar-hanis-iframe.php'. Refreshing the radar display could then be done manually by clicking the 'Refresh' button.

AutoRefreshOff will be turned 'OFF' any time a different radar site, radar type, or refresh interval is selected necessitating the user turn it back on. If it were to remain 'ON' subsequent AutoRefreshes would become unreliable.

-- CACHE --
The 'radar-status-getradar.php' is a modification of Ken True's 'radar-status.php' script for a single radar site.  The modified 'radar-status-getradar.php' adds multi-site capabilities to the 'radar-status.php' script.  One side-effect of the multi-site script is that your site's cache directory, as determined by the 'radar-status-getradar.php' $cacheFileDir = './cache/';' entry, will now contain a status file for each radar site loaded by 'wxusradars-hanis.php'.  Periodic housecleaning of your cache directory of these files is optional, especially if your site has limited disk space.

-- ENHANCEMENT --
Prior versions did not display the most recent radar image of the selected site. Version 20150812 now displays the most recent radar image.


Please post any problems, questions, or suggestions to this thread.

Edit 14 August 2015:  An enhanced version with identical functionality but greater flexibility is posted below (http://www.wxforum.net/index.php?topic=27077.msg260741#msg260741).

Edit 18 August 2015:  Please see this post (http://www.wxforum.net/index.php?topic=27077.msg261300#msg261300) regarding the restoration of Ajax-Gizmo functionality.

Edit 20 August 2015:  Version 3 of this script is now available (http://www.wxforum.net/index.php?topic=27077.msg261523#msg261523).  It adds HAniS 2.5's ability to smooth images at the pixel level, which shows up at extreme Zoom levels in this script.  Version 3 also adds a selector for the number of images to display, removes the 'Refresh' button when auto-refresh is enabled, and defaults to 'AutoRefresh' 'ON'.  Ajax-Gizmo functionality has been restored thanks to Ken True.  Plesae see the included 'wxusradars-hanis3.txt' file for additional information.

Edit 25 August 2015:  Version 3c2 of this script incorporated  a small change in 'wxusradar-iframe-hanis3.php' to use the Button Color on the toggle buttons.  Tom Whittaker added this to Hanis 2.6 released today.  If changing versions upload all of the scripts after preserving customizations in 'wxusradars-hanis3.php'.  Be sure to update '/HAniS/hanis_min.js' to the latest version.

Edit 26 August 2015:  Version 3c3 corrects typos that prevented proper navigation between radar types.

Edit 5 March 2016:  See below for later version.

Edit 22 February 2017:  The latest version, V5 (20170222) is attached to this thread (http://www.wxforum.net/index.php?topic=27077.msg315480#msg315480).
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Skyview on August 12, 2015, 02:30:48 PM
Thanks for providing this. Since it will run standalone I'm going to give it a look and hopefully integrate it to my site.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: n9mfk9 on August 12, 2015, 03:53:25 PM
Hi Jerry,

http://n9mfk.info/cumulus/wxusradars-hanis.php
l have a questions
 what is rock I see I have a choice of  loop or rock but both move?

thanks Beau
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 12, 2015, 04:25:14 PM
Hi Jerry,

http://n9mfk.info/cumulus/wxusradars-hanis.php
l have a questions
 what is rock I see I have a choice of  loop or rock but both move?

thanks Beau
Good question!

Click on 'Rock' and the images display up to the last active image then display in reverse order down to the first active image, then display up to the last active one, etc.  Clicking on the blue square for an image causes it to turn red as it is inactivated.  Inactive images aren't displayed.  Rocking makes the most sense if you have just a few adjacent active images. 'Rocking' would proceed up and back through those images, and if necessary you could zoom in on a particular location of interest. Of course you can 'Pause' the animation at any time.

These controls are best used with the AutoRefresh button set to 'OFF' because all such customization of image viewing will be lost on a Refresh.
Title: UPDATED AGAIN: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 13, 2015, 01:47:20 PM
Sorry guys, but this script has undergone another revision to Version 2 (20150813). In a nutshell, Version 2 provides 3 new settings: one for image display frame rate, one for the number of images to display, and one for the seconds to pause after the last image.  The functionality is otherwise identical to Version 20150812.

Here is the new 'wxusradars-hanis2.txt' ReadMe file:

WxUSRadars-HAniS Version 2 (20150813)

This project derives from my GRLevel3 HAniS scripts, and follows the same outlines. It was made possible because of Tom Whittaker's excellent javascript 'HAniS' HTML5 Animation Script which he has so kindly shared with all. Version 2 includes three new variables which control the image frame rate, number of images to display, and the length of pause after the last image has displayed.

-- CAUTION --
Please read this entire document and carefully follow the instructions before you install this package on your website.

-- FILE LIST ---
Version 20120812 Files Included:
  i)    wxusradars-hanis2.php
  ii)   inc-wxusradars-hanis2.php.
  iii)   wxusradar-hanis-iframe2.php
  iv)      wxusradars-hanis2.txt (this file)
  v)      phptest.php
  vi)      /HAniS/hanis_min.js
  vii)   radar-status-getradar.php

The /HAniS directory should be copied to your site's root, if it isn't already present. If it is already present on your site you may safely delete 'hanis.js' from there. Only '/HAniS/hanis_min.js' is required to run this HAniS-dependent script.

-- SETTINGS --
You should edit the Settings in 'wxusradars-hanis2.php'. If you want to hide the Auto Refresh capabilities of the script, set '$autoRefresn = false'. When 'autoRefresh = false' the manual 'Refresh' button must be used to refresh the radar display.

The 'autoRefreshOff' Setting determines the default AutoRefresh Setting, 'ON' or 'OFF'.  Turning the default AutoRefresh 'OFF' by Setting '$autoRefreshOff = true;' prevents casual users from loading the page and forgetting it while AutoRefresh is 'ON'.

Settings now include:
/************************* Settings *****************************/
$radar = 'N0R'; // Default radar type is set here
$radarLoc = 'oax'; // IMPORTAMT!!! Default radar location is set here
$imageWidth = 600; // Width of radar images
$iframeWidth = 617; // Default IFrame Width -- adjust as needed
$iframeHeight = 620; // Default IFrame Height -- adjust as needed
$autoRefresh = true; // Use Autorefresh? true or false -- Determines whether AutoRefresh even appears
$autoRefreshTime = 8; // Number of minutes between autorefreshes.  IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!!
$autoRefreshOff = true; // Begin with Autorefresh Off? true or false -- 'OFF' or 'ON"
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'mediumblue'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
$pauseSeconds = 2; // Pause on last image, in seconds - 0 for no pause
$animRate = 20; // Frame Rate of animation: see below
$numbImages = 12; // Number of Radar Images to Animate - 3 to around 25
/*********************** End Settings ***************************/
These are the defaults for 'wxusradars-hanis2.php'.

Change '$radarLoc' to your preferred WFO, and edit anything else to your liking.  You shouldn't need to touch '$imageWidth', '$iframeWidth, or '$iframeHeight'.

When changing any of the '$bgndColor', '$btnColor', or '$btnTextColor' variables only HTML Color Names are passed to 'wxusradar-hanis-iframe2.php'. Therefore hex colors, e.g. #0000CC, will show up on the first row of buttons, but not the second. Another option would be to use RGB colors. The legal color names are listed at http://www.w3schools.com/html/html_colornames.asp

The '$autoRefreshTime' allows users to increase the frequency of AutoRefreshes when their radar of interest is updating more frequently because of local weather activity. The longest interval between NWS Ridge Radar updates is 10 minutes, but longer intervals may be selected when the weather is uneventful.  The NWS states that a 4 minute Ridge Radar update is the minimum, but I have observed updates just a minute apart on the Legend.

The $pauseSeconds variable indicates the number of seconds to pause after the latest image has been displayed.

The $animRate variable controls the animation frame rate which requires integers only, and the values' results are: 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with an integer only.

The $numbImages variable displays the number of images to display.

-- INSTALLATION --
After reviewing and changing the Settings, upload all five scripts to your site along with the /HAniS directory, and add 'wxusradars-hanis2.php' to your site's menu. If your site has 'wxusradars-select-hanis.php', you may delete it.  The functionality of this file has been added to 'inc-wxusradars-hanis2.php'. As another benefit of this change, editing of 'selected="selected"' is no longer required.

The main file, 'wxusradars-hanis2.php', now includes a Stand-Alone option with '$standalone = false' as the default for Saratoga template use.  When '$standalone = true' the script runs outside the Saratoga template.  You could save a script thus modified as 'wxusradars-hanis-SA.php' or some such.

All of the selectors use the same button color options as HAniS and are the same color as the radar control buttons.  The AutoRefresh and Refresh Interval selectors are found inline with the other selectors above the radar location and type.  This was necessary because during a (auto)refresh the entire 'inc-wxradars-hanis2.php' must be reloaded so the correct variable parameters are active in order to avoid browser caching of directories.

-- LIMITATIONS --
The included 'phptest.php' will, when run, list all of the important Settings of your webhost's PHP, including PHP version and most importantly whether 'allow_url_fopen' is 'on'.  If it is 'off', the script will fail because it will be unable to get the directory file listings from 'http://radar.weather.gov/ridge' due to strict javascript cross-domain limitations. If 'allow_url_fopen' is 'off', the static map, county, highway, river, and city overlays will show up and be selectable, but no dynamic radar, warnings, or legend layers will appear. You will just see a static map.

If you encounter this condition, you or your webhost's administrators will need to edit your site's 'php.ini' to read 'allow_url_fopen = on'. While running your site with 'allow_url_fopen' 'on' represents a slightly greater security risk, unless your site's users enter their sensitive information such as credit card or social security numbers, this risk should be minimal.  This script contains no user input, so risks from it should be nil.  You should evaluate the remainder of scripts on your web site to determine if they present a significant risk with 'allow_url_fopen' 'on'.

An alternative approach to turning 'allow_url_fopen' 'on' would be to forego AutoRefresh by Setting 'autoRefresh = false;' thus turning off the display of any AutoRefresh options. Then where another site has 'allow_url_fopen' 'on' you would need to point your <iframe> at that site's 'wxusradar-hanis-iframe2.php' in 'inc-wxusradars-hanis2.php' by changing 'src="./wxusradar-hanis-iframe2.php' to, for example, 'src="http://www.gwwilkins/wxusradar-hanis-iframe2.php'. Refreshing the radar display could then be done manually by clicking the 'Refresh' button. The possibility that someone is pointing to '(another.site)/wxusradars-hanis-iframe.php' necessitates the creation of Version 2.

AutoRefreshOff will be turned 'OFF' any time a different radar site, radar type, or refresh interval is selected necessitating the user turn it back on. If it were to remain 'ON' subsequent AutoRefreshes would become unreliable.

-- CACHE --
The 'radar-status-getradar.php' is a modification of Ken True's 'radar-status.php' script for a single radar site.  The modified 'radar-status-getradar.php' adds multi-site capabilities to the 'radar-status.php' script.  One side-effect of the multi-site script is that your site's cache directory, as determined by the 'radar-status-getradar.php' $cacheFileDir = './cache/';' entry, will now contain a status file for each radar site loaded by 'wxusradars-hanis2.php'.  Periodic housecleaning of your cache directory of these files is optional, especially if your site has limited disk space.

-- ENHANCEMENT --
Prior unnumbered versions did not display the most recent radar image of the selected site. Version 1 (20150812) and Version 2 (20150813) now display the most recent radar image.

-- USAGES --
Running 'wxusradars-hanis2.php' as a part of a Saratoga template menu system is the standard use of this script. The '$standAlone' option which is isolated near the top of 'wxusradars-hanis2.php' when set to 'true' provides some interesting possibiilities. For instance, a version of 'wxusradars-hanis2.php' with '$standAlone = true', 'numbImages = 5', '$animRate = 15', and '$pauseSeconds = 0' could be saved as 'wxusradars-hanis2-slow5.php (http://www.gwwilkins.org/wxusradars-hanis2-slow5.php)'.  You could then view as a stand-alone the last 5 images of any radar at a slower speed in which case 'Rock' becomes much more useful without suppressing the display of some images. Or if there's some particularly intense weather somewhere you wish to see the development, a version with '$standAlone = true' and 'numbImages = 25' could be saved as 'wxusradars-hanis2-past25.php (http://www.gwwilkins.org/wxusradars-hanis2-past25.php)'.

Or alternatively you could save these or similarly modified scripts with '$standAlone = false' and add them to your menu system. I prefer the cleaner Stand Alone versions that help conserve bandwidth by not loading the Saratoga template. You have many choices.



The zip is attached here, and not to the first post.

Edit 15 August 2015:  I forgot to remove '/HAniS/hanis.js' from this zip.  Feel free to delete it from your site because it's just taking up disk space.

Edit 18 August 2015:  Please see this post (http://www.wxforum.net/index.php?topic=27077.msg261300#msg261300) regarding the restoration of Ajax-Gizmo functionality.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 15, 2015, 12:46:48 AM
Jerry have it going, I found  ‘allow_url_fopen’ was ‘off’ in my site’s php.ini like you suspected. Turned on and all is good. Thank you very much for all the time you put in helping figure out my problem, great script.  =D&gt;
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 15, 2015, 07:52:43 AM
That's great news, Randy.  :-) Thanks to you for helping sort out the 'allow_url_fopen' issue by putting several '-test' versions up on your site.  Remember that Version 2 is available above if you ever feel the need for more control over HAniS than the defaults in Version 1 (20150812).

(As an aside, the reason 'allow_url_fopen' needs to be 'on' is to read into memory using php's 'file_get_contents()' the dynamic overlay 'http://radar.weather.gov/ridge' Image, Warning, and Legend directory contents.  Without this only the static overlays which never change are displayed by the 'inc-wxusradars-hanis.php' or 'inc-wxusradars-hanis2.php' 'src="./wxusradar-hanis-iframe.php' or 'src="./wxusradar-hanis-iframe2.php'.  Additionally, security issues absolutely prevent javascript execution in a different domain than the original one, so running 'wxusradar-hanis-iframe' or '-iframe2' on another site prevents any AutoRefresh, which uses jQuery and javascript, from occurring.)

(As another aside, I forgot to delete '/HAniS/hanis.js' before I zipped up Version 2 (20150813) above.  Rather than post yet another version, feel free to delete this unnecessary file from your site. It's just taking up disk space.)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 15, 2015, 01:19:45 PM
(As another aside, I forgot to delete '/HAniS/hanis.js' before I zipped up Version 2 (20150813) above.  Rather than post yet another version, feel free to delete this unnecessary file from your site. It's just taking up disk space.)

Unless one is running your gr3hanis as well, or has it been removed from there, too?
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 15, 2015, 01:39:48 PM
(As another aside, I forgot to delete '/HAniS/hanis.js' before I zipped up Version 2 (20150813) above.  Rather than post yet another version, feel free to delete this unnecessary file from your site. It's just taking up disk space.)

Unless one is running your gr3hanis as well, or has it been removed from there, too?
'/HAniS/hanis.js' isn't used in either script, John, because their <iframe> codes point to '/HAniS/hanis_min.js' :-)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 15, 2015, 01:44:41 PM
Thanks, Jerry. Just dumped it.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: n9mfk9 on August 15, 2015, 01:46:55 PM
Hi Jerry,
i was just look at some pages that are html5 in ken's code i had these two lines added
Code: [Select]

require_once("Settings.php");
require_once("common.php");
############################################################################
$useHTML5 = true;  // force this page to use HTML5 instead of XHTML 1.0-Transitional
$useUTF8 = true;   // force this page to convert language files to UTF8 for display
#

also where wxusalerts.php come from i not in the zip?


Beau
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 15, 2015, 07:21:53 PM
Hi Jerry,
i was just look at some pages that are html5 in ken's code i had these two lines added
Code: [Select]

require_once("Settings.php");
require_once("common.php");
############################################################################
$useHTML5 = true;  // force this page to use HTML5 instead of XHTML 1.0-Transitional
$useUTF8 = true;   // force this page to convert language files to UTF8 for display
#

The purpose of this script is to dispense with the Flash display of GRLevel3 images.  My intent is not to create an HTML5 compliant script.  When you add those two lines, validation fails in a number of places.  Maybe someday...

Quote
also where wxusalerts.php come from i not in the zip?


Beau

Read this post (http://www.wxforum.net/index.php?topic=17658.msg215046#msg215046) carefully, and if you install the script modify the 'include("footer-invalid.php");' to 'include("footer.php");' unless you create a footer without the W3C Validator links. In the absence of 'wxusalerts.php' the 'wxgr3hanis.php' link should display the main NWS page, www.weather.gov, which consists of the alerts map. The 'wxusalerts' script was created from this map and just scrapes it for Saratoga template display.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 17, 2015, 01:27:14 PM
Jerry, I'm using wxusradar-hanis2-20150813.zip and I'm having one problem.  When I try to select a different radar site from the drop-down menu, the new site doesn't load.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 17, 2015, 01:37:36 PM
Further on my last, while all of the buttons seem to respond, nothing in the frame changes.  The only change I've made is to the directory location of the entire package.  I'm using root/Hanis3.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 17, 2015, 02:21:12 PM
Further on my last, while all of the buttons seem to respond, nothing in the frame changes.  The only change I've made is to the directory location of the entire package.  I'm using root/Hanis3.
The package isn't set up to run from a subdirectory, Tom.  You need to modify the scripts to reflect the change, or run it from the site's root.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 17, 2015, 02:27:42 PM
I thought I did : :? but I must have missed something that causes the buttons to work!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 17, 2015, 03:26:22 PM
OK I reverted back to installing it in root/Hanis but still have that issue.

*EDIT*  My mistake (which comes as no surprise) this goes in the root not root+Hanis as the Gr3 scripts do.  It's working now.  Thank you!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 18, 2015, 02:40:22 PM
Thought I'd bug you over here, Jerry. Takes your mind off the other problem (maybe).

Stan and I are having the same problem with the gizmo on our Ridge pages. Only "Updated" and the time flash green (the time is actually updating). Nothing else is displaying or, of course, updating.
Both pages validate OK.

http://dwayneyamato.com/wx/wxusradars-hanis2.php
http://tiggrweather.net/wxusradars-hanis2.php

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 18, 2015, 04:24:15 PM
I see now that's a universal problem with my HAniS-based scripts, John.  There's something about them that's prevents the variable rotation from displaying in the ajax-gizmo.  'Inspect'ing in Chrome I see that all of the variables are created normally.  It's just that the style of display is 'none' for all of them (see attachment).

I'm not sure why this is occurring, but if it bothers you enough you can always set '$showGizmo = false;' in 'wxusradars-hanis.php' or 'wxusradars-hanis2.php'.  I've done a quick web search for similar problems, and I've come up empty.  There are references to AJAX calls shutting off jQuery, but not vice versa.  I'll keep my eyes open for a solution.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: saratogaWX on August 18, 2015, 05:38:27 PM
On both http://dwayneyamato.com/wx/wxusradars-hanis2.php and http://tiggrweather.net/wxusradars-hanis2.php
the ajaxgizmo.js script is not loaded, so the conditions will NOT rotate or display.  The ajax-gizmo.php generates the HTML with style="display:none;" defaults for all the <span class="ajaxcontentn">...</span> entries and relies on the ajax-gizmo.js to find the one entry, change it to 'display: block', then back to 'display:none' so each entry is "revealed" in turn.

If the ajaxgizmo.js script is not loaded, none of the gizmo entries will display (as you are seeing).  It's normally loaded by top.php based on $showGizmo = true; in the page.

If you change the HAnIS page from
Code: [Select]
include("top.php");
$showGizmo = true; // Set to false to exclude the gizmo
to
Code: [Select]
$showGizmo = true; // Set to false to exclude the gizmo
include("top.php");
then it will likely work as expected :)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 18, 2015, 06:05:36 PM
Yes that worked , Thanks much Ken.  =D&gt;
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 18, 2015, 06:13:40 PM
Perfect, Ken. Thanks! =D&gt;

The Master to the rescue again!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 18, 2015, 07:03:09 PM
Nailed it, Ken - as always.

Thanks very much :!:   :grin:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 09:04:12 AM
Version 3 of this script is now available.  It adds HAniS 2.5's ability to smooth images at the pixel level, which shows up at extreme Zoom levels in this script.  Version 3 also adds a selector for the number of images to display, removes the 'Refresh' button when auto-refresh is enabled, and defaults to 'AutoRefresh' 'ON'.

Plesae see the included 'wxusradars-hanis3.txt' file for additional information.

Edit 2015 August 20:  The original zip contained references to my test version which I forgot to update when I saved it as a production version.   :oops: The attached version is the correct one.  Modified files are 'wxusradars-hanis3.php' and 'inc-wxusradars-hanis3.php'

Edit2 2015 August 20:  The button alignment scheme in 'inc-wxusradars-hanis3.php' was flawed.  The attached 'inc-wxusradars-hanis3a.php' contains ONLY a revised include file that addresses this problem.

Edit3 2015 August 20:  The timer values in 'inc-wxusradars-hanis3a.php' were used for testing, and refresh much more frequently than the indicated times.  'inc-wxusradars-hanis3b.zip' contains the proper timer settings.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 20, 2015, 10:13:14 AM
Thanks Jerry works great on my end.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 20, 2015, 10:16:53 AM
One Thing I noticed it does open with auto refresh on which I like, but changing radar sites it switches off. No biggy just pointing out.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 11:29:22 AM
Thanks Jerry works great on my end.
  :grin: :grin: :grin:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 11:35:20 AM
One Thing I noticed it does open with auto refresh on which I like, but changing radar sites it switches off. No biggy just pointing out.
  (RTFM?  :-P) AutoRefresh was unreliable if left 'ON' when changing other parameters.  It automatically switches 'OFF' when any selector is modified.  I'll check it again soon and see if I still see the need for this--I don't like it either! It's annoying.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 20, 2015, 11:39:43 AM
Flash version is the same way. I would leave it as is.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: TupeloWeather on August 20, 2015, 03:23:06 PM
Thanks for the great script! I'm having a bit of an issue that I'm sure is something I've overlooked - probably.  When I run the wxusradars-hanis3.php file I receive this - Warning: include(inc-wxusradars-hanis3-test.php): failed to open stream: No such file or directory in /home/USERNAME/public_html/radar/wxusradars-hanis3.php on line 118.  I can't seem to locate the inc-wxusradars-hanis3-test.php file.  I have uploaded into /radar instead of /hanis as I'm not ready to remove my current radar.
Suggestions?
Thanks!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 20, 2015, 03:47:28 PM
I made the same mistake.  Jerry advises that it must be placed in the root directory.  Once you put it there it works well.  Also, Jerry... ver. 3 works just fine here.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: TupeloWeather on August 20, 2015, 03:49:31 PM
What part did you have to put into the root directory.  I realize the instructions say to place the /hanis folder in the root directory but I didn't see anything about placing any files there.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 20, 2015, 03:55:53 PM
I put them all there.  Just extract the entire package to the root & customize wxusradars-hanis3.php to suite your needs and it should work.  You could edit the scripts individually to change the location but they all aren't apparent & I found it easier to just listen to the guy who wrote the script. 
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: TupeloWeather on August 20, 2015, 04:05:54 PM
I seem to be missing something else that is probably very apparent.  I have copied all files to the /hanis folder as well as copied all to the root and continue to get the exact same result. 
http://www.tupeloweather.com/wxusradars-hanis3.php
Is this file - inc-wxusradars-hanis3-test.php - generated from another file?  That file does not exist in the package that I unzipped and installed.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 20, 2015, 04:20:30 PM
Hanis folder stays as is. Put on root directory along with the other php files. Same directory your index.php is located. Did you say true on standalone?
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: TupeloWeather on August 20, 2015, 04:26:23 PM
Thanks - Yes -
$standAlone            = true;
I have placed all files in both the root and /hanis directories and tried executing from each location with the same result in each. 
I'm scratching my head...
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 04:40:49 PM
Indeed there was a problem with the Version 3 zip!  The references to the supporting files in 'wxusradars-hanis3.php' and 'inc-wxusradars-hanis3.php' weren't updated when I saved the test version as a production version.  :oops: Corrected scripts are in the post above (http://www.wxforum.net/index.php?topic=27077.msg261523#msg261523).

My apologies. :-(
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 20, 2015, 04:43:00 PM
When I run the wxusradars-hanis3.php file I receive this - Warning: include(inc-wxusradars-hanis3-test.php): failed to open stream: No such file or directory in /home/USERNAME/public_html/radar/wxusradars-hanis3.php on line 118.  I can't seem to locate the inc-wxusradars-hanis3-test.php file.

I just ran into the same problem. There are three items that are looking for file names with the -test.php. Two are in the wxusradars-hanis3.php at approx line 119 - <?php include('inc-wxusradars-hanis3-test.php');?>. Also at approx line 98 in the function line - load('inc-wxusradars-hanis3-test.php. Just remove the -test from those items.

The other is in inc-wxusradars-hanis3.php in the long line 840. Look for src="./wxusradar-hanis-iframe3-test.php and again just remove the -test.

ALL files go in the root, including the /HAniS/.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 20, 2015, 04:45:55 PM
Have an interesting problem with mine. Please see attached.

http://tiggrweather.net/wxusradars-hanis3.php

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 20, 2015, 04:52:45 PM
Have an interesting problem with mine. Please see attached.

http://tiggrweather.net/wxusradars-hanis3.php

Thanks.

Its IE, does the same here but not in Chrome.
Jerry the update you just did I take it was for standalone. I'm not having same issue as  TupeloWeather with saratoga. 
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 20, 2015, 04:56:01 PM
Have an interesting problem with mine. Please see attached.

http://tiggrweather.net/wxusradars-hanis3.php

Thanks.

Its IE, does the same here but not in Chrome.

On an iMac here, Randy, with FF v40.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 05:01:55 PM
Have an interesting problem with mine. Please see attached.

http://tiggrweather.net/wxusradars-hanis3.php

Thanks.

Its IE, does the same here but not in Chrome.
Jerry the update you just did I take it was for standalone. I'm not having same issue as  TupeloWeather with saratoga.
The update fixed bad file name references to '-test' files.  The '-test' references have been removed.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 05:04:57 PM
Have an interesting problem with mine. Please see attached.

http://tiggrweather.net/wxusradars-hanis3.php

Thanks.
I don't see the problem now that you're using a narrow width, John.  It looks like I might need to clean up the code so the buttons always line up horizontally.  The current version uses '<br/>' and '&nbsp;', but I think I need to do something else.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on August 20, 2015, 05:08:50 PM
I never uploaded the '-test' references php. Maybe that's why I didn't see it.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 05:29:16 PM
Have an interesting problem with mine. Please see attached.

http://tiggrweather.net/wxusradars-hanis3.php

Thanks.
All of the buttons line up horizontally with this version of 'inc-wxusradars-hanis3.php'.  I tested it with all of the latest versions of FF, Chrome, IE, and Safari, and it works for me.

Alert!  Bad values for timer in 'inc-wxusradars-hanis3a.php' that cause frequent refreshes.  Normal values in 'inc-wxusradars-hanis3b.zip'.  Darn test values!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 05:32:43 PM
I never uploaded the '-test' references php. Maybe that's why I didn't see it.
Actually, looking at Version 3 on your site right now (http://www.valentinenebraska.net/wxusradars-hanis3.php) it is not quite there yet, Randy.  Use the latest version or remove the '-test' from the links in 'wxusradars-hanis3.php' and 'inc-wxusradars-hanis3.php', and all should be well.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 20, 2015, 05:37:34 PM
I don't see the problem now that you're using a narrow width, John.  It looks like I might need to clean up the code so the buttons always line up horizontally.  The current version uses '<br/>' and '&nbsp;', but I think I need to do something else.

Only have to use wide on the GR3 page, Jerry (oops, sorry - didn't mean to mention that name   :roll:  ).

The line-up problem is OK on Safari but also fails on Chrome (both Mac), and fails on FF v42.0.2 on Win10. Now that I've made FF my default browser Edge refuses to open. Interesting.

Where there only three instances of the -test thing? Missed your message about the problem. Appears I was writing mine the same time you posted yours.

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 20, 2015, 05:42:29 PM
Jerry, just downloaded your 3a version but find only the inc- file. There were also two calls to -test in the wxusradars-hanis3.php file.

Confused...
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 05:42:44 PM
The line-up problem is OK on Safari but also fails on Chrome (both Mac), and fails on FF v42.0.2 on Win10. Now that I've made FF my default browser Edge refuses to open. Interesting.

Where there only three instances of the -test thing? Missed your message about the problem. Appears I was writing mine the same time you posted yours.

Thanks.
The problem with alignment of the buttons in the original 'inc-wxusradars-hanis3.php' varies with browser zoom level.  The revised version's alignment uses CSS styling 'vertical-align:bottom', and holds the buttons in horizontal alignment no matter the zoom level.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 05:43:57 PM
Jerry, just downloaded your 3a version but find only the inc- file. There were also two calls to -test in the wxusradars-hanis3.php file.

Confused...
The zip is 'inc-wxusradars-hanis3a.zip', and only contains the revised include script.

BTW 'inc-wxusradars-hanis3a' contained the testing timer values and refreshes much more frequently than the indicated time.  'inc-wxusradars-hanis3b.zip' includes the correct timer values.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: TupeloWeather on August 20, 2015, 06:21:07 PM
Thanks, gentlemen.  I have the page working now but found another slight issue.  If the button color ($btnColor) is changed to a hexadecimal # the first row of buttons on the page will load with the new color and then will not continue past that.  Is this easily fixable?
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 20, 2015, 06:27:54 PM
Thanks, gentlemen.  I have the page working now but found another slight issue.  If the button color ($btnColor) is changed to a hexadecimal # the first row of buttons on the page will load with the new color and then will not continue past that.  Is this easily fixable?
Passing hex colors to the <iframe> doesn't work because the values stop at '#'.  Use color names as indicated in the text file or RGB values.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: TupeloWeather on August 20, 2015, 06:37:54 PM
Thanks.  I had overlooked that - more than once.   :oops:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 20, 2015, 10:58:28 PM
OK - I give. How does zoom work? Don't think I missed it in the readme, but clicking the button does nothing. Or should I just go for another nap...?

http://tiggrweather.net/wxusradars-hanis3.php

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: TupeloWeather on August 20, 2015, 11:01:19 PM
After you click the Zoom button, click the map to zoom.  Click Unzoom to return to normal.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on August 20, 2015, 11:04:54 PM
Hmm - it works!  #-o

Think I'll take the nap anyway...

Tank U :!:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 21, 2015, 09:32:22 AM
I came across a css validation error with the newest version of inc-wxusradars-hanis3.php.  Value Error : text-align top is not a text-align value :  top

EDIT: The XHTML 1.0 Transitional validation also fails if $autoRefresh = false; & $autoRefreshOff = true; are opted for.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 21, 2015, 12:51:34 PM
I came across a css validation error with the newest version of inc-wxusradars-hanis3.php.  Value Error : text-align top is not a text-align value :  top

EDIT: The XHTML 1.0 Transitional validation also fails if $autoRefresh = false; & $autoRefreshOff = true; are opted for.

I missed those issues, Tom.  Thanks!  I also tested a stand alone version (http://www.gwwilkins.org/wxusradars-hanis3-SA.php), and it passes validation (https://validator.w3.org/check?uri=http%3A%2F%2Fwww.gwwilkins.org%2Fwxusradars-hanis3-SA.php&charset=%28detect+automatically%29&doctype=Inline&group=0) as well.

Revised Version 3b (20150821) attached.  Only 'wxusradars-hanis3.php', 'inc-wxusradars-hanis3.php' and 'wxusradars-hanis3.txt' are changed.

Edit 2015 August 23:  Wrong 'wxusradar-hanis-iframe.php' was included in the zip instead of 'wxusradar-hanis-iframe3.php'.  Corrected!


Edit 2015 August 25:  Version 3c of this script incorporates  a small change in 'wxusradar-iframe-hanis3.php' to use the Button Color on the toggle buttons.  Tom Whittaker added this to Hanis 2.6 released today.  If changing versions upload all of the scripts after preserving customizations in 'wxusradars-hanis3.php'.  Be sure to update '/HAniS/hanis_min.js' to the latest version.

Edit2 2015 August 25:  Two typos bollixed the selection of the radars, 'O's instead of '0's.  These have been fixed in Version 3c2 and Version 3c has been removed.

Edit 2015 August 26:  There was one additional typo  that needed correction.  This has been fixed in Version 3c3 and Version 3c2 has been removed.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on August 21, 2015, 02:44:16 PM
That fixed both issues!  You need to rest now & take a coffee break  =D&gt;
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jerbo on August 23, 2015, 04:33:35 PM
The latest version zip file wxusradars-hanis3b-20140821.zip, has the file wxgr3hanis-iframe.php, not wxusradar-hanis-iframe3.php.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 23, 2015, 04:44:55 PM
The latest version zip file wxusradars-hanis3b-20140821.zip, has the file wxgr3hanis-iframe.php, not wxusradar-hanis-iframe3.php.
Another big  :oops: - Sorry, and thanks for picking up on this!

Corrected zip attached above.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jerbo on August 23, 2015, 04:53:41 PM
No problem. Wish I would have noticed sooner. At least I figured out why the script wasn't working, on my site.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: mikeym2m on August 25, 2015, 09:49:47 AM
Thanks Jerry - working well for me.

Cheers

 :grin:

MikeyM
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 25, 2015, 02:32:18 PM
Tom Whittaker has updated HAniS to Version 2.6 which adds the ability to change the color of the toggle buttons.  Version 3c incorporates this and is available above (http://www.wxforum.net/index.php?topic=27077.msg261680#msg261680).
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jerbo on August 25, 2015, 08:11:15 PM
I found  a small problem with the script. When you click the base velocity or storm relative velocity in the dropdown menu, the correct radar shows. However, the dropdown for both reads base reflectivity. Then the only way to go back to base reflectivity is choose composite reflectivity or either of the precipitations in the dropdown menu.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 25, 2015, 10:52:59 PM
I found  a small problem with the script. When you click the base velocity or storm relative velocity in the dropdown menu, the correct radar shows. However, the dropdown for both reads base reflectivity. Then the only way to go back to base reflectivity is choose composite reflectivity or either of the precipitations in the dropdown menu.
Thanks, jerbo!  There were two typos, 'O's instead of '0's, in 'inc-wxusradars-hanis3.php' that were messing with 'selected="selected"'.  These have been fixed in Version 3c2 20150825 above.  Version 3c has been removed.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jerbo on August 26, 2015, 09:51:23 AM
Thanks, the script works great, although the Base Reflectivity also has an O instead of 0.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 26, 2015, 10:40:12 AM
Well, I'm nothing if not consistently unable to see the difference between a 'O' and a'0' in Dreamweaver.  Good eyes, and thanks.  Updated Version 3c3 (http://www.wxforum.net/index.php?topic=27077.msg261680#msg261680) has replaced Version 3c2 above.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jerbo on August 26, 2015, 12:51:10 PM
I can only see the difference in notepad++ or notepad.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Breezy on August 28, 2015, 02:40:14 PM
Working great here ... Thanks. Jerry   :grin:

Jeff
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Silversword on August 29, 2015, 02:36:49 PM
Hi All,

I have been following this project and made the plunge and got it up and running.  Looking pretty good so far.  See http://www.dwayneyamato.com/wx/wxusradars-hanis3.php (http://www.dwayneyamato.com/wx/wxusradars-hanis3.php).

Thanks Jerry for all the effort that you put into this project.

We are bracing for a couple of storms that is heading towards our State, starting this coming week.  Hoping for the best, preparing for the worst.

Regards,

--Stan Y.
   Maui, Hawaii
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Breezy on August 29, 2015, 08:19:36 PM
Good luck Stan ...  :!:

Jeff
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Silversword on September 03, 2015, 01:19:12 AM
Hi All,

Looks like we have been very lucky in dodging the bullet several times so far.

Regards,

--Stan Y.
   Maui, Hawaii
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on September 15, 2015, 05:57:51 PM
This script fell over on me this morning because 'file_get_contents()' was broken for me on my site.  Others have as yet to experience the problem, but the fix was to use a 'user agent', HTML1.1, and the de-chunker routine in Ken True's 'QJ_fetchUrlWithoutHanging()'.  A more detailed discussion can be found here (http://www.wxforum.net/index.php?topic=26352.msg264209#msg264209).  The script now works (http://gwwilkins.org/wxusradars-hanis3.php).

The only changed file is 'wxusradar-hanis-iframe3.php' which you can acquire by right-clicking on the source here (http://gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view), selecting 'Save as...', and saving without the '.txt' extension.  While it's not needed for most installations right now, there will come a time when it is.

'?sce=view' is working sporadically for me at the moment.  I've attached the file as a '.txt' file.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on September 15, 2015, 06:14:55 PM
Works here (before and after this update)..

Thanks, Jerry.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on September 15, 2015, 07:29:53 PM
Works here (before and after this update)..

Thanks, Jerry.
At least I'm batting .500 :-)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on September 15, 2015, 08:49:29 PM
At least I'm batting .500 :-)
Such a deal...  :grin:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 29, 2015, 05:17:18 AM
Hi Jerry,

Thanks for providing this script.

I am having a problem running in 'stand-alone' mode when the script is called, it will not load the radar site specified in the $radarLoc = parameter. It defaults to Birmingham. Modifying other parameters such as $autoRefreshOff will change the mode.

I've set the php parameter, 'allow_url_fopen' to 'on'.

Any suggestions would be appreciated.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 29, 2015, 10:29:26 AM
Hi Jerry,

Thanks for providing this script.

I am having a problem running in 'stand-alone' mode when the script is called, it will not load the radar site specified in the $radarLoc = parameter. It defaults to Birmingham. Modifying other parameters such as $autoRefreshOff will change the mode.

I've set the php parameter, 'allow_url_fopen' to 'on'.

Any suggestions would be appreciated.
Unfortunately you've entered somewhat untested waters.  Although a URL would have been helpful I can see your 'wxusradars-hanis3.php', but due to a bug in my code-order I can't view the source. (My bad!)

The version 3 you're using had been replaced by version 3b, which still contained a self-downloader bug due to code placement/order.  Version 3c dated today is now up on my site (http://www.gwwilkins.org/wxusradars-hanis3.php?sce=view) with a new stand-alone version (http://www.gwwilkins.org/wxusradars-hanis3-SA.php?sce=view) as well.  (You don't need to rename 'wxusradars-hanis3.php' to 'wxusradars-hanis3-SA.php' in order for the stand-alone capability to function.  I've done so for demonstration purposes.)

Only the main script needed modification and not the supporting 'includes (http://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view)' and 'iframe (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view)' scripts.

While you can set the 'fallover defaults' in the two support scripts to your local radar, the only '$radarLoc' that needs to point to your local radar is the one in the main script, 'wxusradars-hanis3.php'.  If you set '$radarLoc' to your local radar only in a supporting script and not the main script you will not see your desired local radar.  All of the defaults in the supporting scripts exist solely to allow debugging and they are not used when these scripts are called by 'wxusradars-hanis3.php'.

I hope this helps, but if not post a link to your 'wxusradars-hanis3.php' so I can look at the code.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 29, 2015, 12:12:12 PM
Thanks for your quick response Jerry. I've replaced the existing version of 'wxusradars-hanis3.php' with the version you have posted. I'm still having the same problem. I'm thinking it's because of the include calls for the Carterlake or Saratoga scripts that might be causing a problem.

At any rate, I'm running the script at the following: http://whitsweb.com/wxusradars-hanis3-sa.php

I'd appreciate any suggestions.

Randy
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 29, 2015, 12:39:18 PM
Thanks for your quick response Jerry. I've replaced the existing version of 'wxusradars-hanis3.php' with the version you have posted. I'm still having the same problem. I'm thinking it's because of the include calls for the Carterlake or Saratoga scripts that might be causing a problem.

At any rate, I'm running the script at the following: http://whitsweb.com/wxusradars-hanis3-sa.php

I'd appreciate any suggestions.

Randy
You are still showing 'Version 3' and '?sce=view' doesn't display the source.  Are you sure you've uploaded the script to your web site?

(BTW, all of the Saratoga calls are bypassed in 'Stand-Alone'.)

Additionally, I think you need to save the source of the 'includes' and 'iframe' I linked to above and also upload those to your web site.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 29, 2015, 01:02:07 PM
Hmm...Using http://whitsweb.com/wxusradars-hanis3-sa.php brings up the page with the script but it's defaulted to Birmingham instead of the parameter set. Appending ?sce=view' displays the text of the script.

I've uploaded all the files from your original distro except for the text file to my server.

Thanks for your time Jerry.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 29, 2015, 01:23:30 PM
Jerry,

Just to clarify, I've downloaded what I presume is your latest distro, wxusradars-hanis3c3-20150825.zip.

By the way, in inc-wxusradars-hanis3.php on line 102, it appears there is an error:

<option value="srx"<?php echo (($radarLoc=="srk")?' selected="selected"':'')?>>W. Ark./

Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on November 29, 2015, 01:25:53 PM
You seem to have specified an invalid radar site:  $radarLoc = 'cix';.  perhaps you mean to use this: $radarLoc = 'mxx';?  That is the Eastern Alabama NEXRAD site.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: tmabell on November 29, 2015, 01:30:55 PM
Update, I think it is your intention to use the Cedar City, UT site?  If so then use this id: ICX.  Simple typo it would appear  :-)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 29, 2015, 01:38:04 PM
Jerry,

Just to clarify, I've downloaded what I presume is your latest distro, wxusradars-hanis3c3-20150825.zip.

By the way, in inc-wxusradars-hanis3.php on line 102, it appears there is an error:

<option value="srx"<?php echo (($radarLoc=="srk")?' selected="selected"':'')?>>W. Ark./
Right you are!  The string should be 'srx' in both locations.  Corrected version on my site (http://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view).
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 29, 2015, 01:38:35 PM
Hmm...Using http://whitsweb.com/wxusradars-hanis3-sa.php brings up the page with the script but it's defaulted to Birmingham instead of the parameter set. Appending ?sce=view' displays the text of the script.

I've uploaded all the files from your original distro except for the text file to my server.

Thanks for your time Jerry.
Randy, I'm asking you to REPLACE any prior files on your server with those you SAVE ('R-Click', select 'Save as...', and save without the '.txt') with the 'wxusradars-hanis3.php (http://www.gwwilkins.org/wxusradars-hanis3.php?sce=view)' and the 'includes' and 'iframe' links above (http://www.wxforum.net/index.php?topic=27077.msg270859#msg270859).

I no longer issue distributions for HAniS-based scripts.  I will inform you when changes are made, but you need to save the scripts themselves using the links to my site.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 29, 2015, 02:17:19 PM
Success Jerry, thanks for your help.

I replaced the files downloaded in the ZIP distros with individual files from your site, everything works fine now.

Curiously, when editing then saving wxusradars-hanis3-sa.php in Dreamweaver, changing $radarLoc to icx resulted in $radarLoc = 'cix'.

Editing with Notepad++ from the file directly from the file downloaded off the server resulted in a correct parameter.

At any rate, I'm very pleased with this script you've provided and the help you've given in helping to get it to work, Thanks!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 29, 2015, 02:53:41 PM
We still have work to do, Randy.  Your 'Stand-Alone' version isn't showing the layers that contain the Legend, Warnings, and Radar.  It's only showing the last images which are 'hard-coded' into the script.  I see via 'phptest.php' you have 'allow_url_fopen = on' in your 'php.ini', so that shouldn't be the problem.

For some reason you didn't upload the latest version of 'wxusradar-hanis-iframe3.php (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view)' because your old version is still using 'file-get-contents' rather than a new cURL routine to read the directories containing the layers.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 29, 2015, 03:35:17 PM
Jerry, somehow I wound up with Version 3c3 (20151122) of wxusradar-hanis-iframe3.php rather than the Version 3b (20150917) you are pointing to now. Any problems with that?

Also, there seems to be a <title> problem in both of those versions (line 22).   :roll:

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on November 29, 2015, 03:46:45 PM
Thanks Jerry fixed it.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 29, 2015, 04:04:04 PM
Jerry, somehow I wound up with Version 3c3 (20151122) of wxusradar-hanis-iframe3.php rather than the Version 3b (20150917) you are pointing to now. Any problems with that?

Also, there seems to be a <title> problem in both of those versions (line 22).   :roll:

Thanks.
The eagle eye again, John, spotting my code-snitching! #-o Title corrected, and all versions of these scripts on my site, including the '-SA' variant, are now versioned 3d and dated today.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 29, 2015, 05:44:33 PM
Three 'd' version files posted and lookin' good.

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 29, 2015, 07:41:01 PM
We still have work to do, Randy.  Your 'Stand-Alone' version isn't showing the layers that contain the Legend, Warnings, and Radar.  It's only showing the last images which are 'hard-coded' into the script.  I see via 'phptest.php' you have 'allow_url_fopen = on' in your 'php.ini', so that shouldn't be the problem.

For some reason you didn't upload the latest version of 'wxusradar-hanis-iframe3.php (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view)' because your old version is still using 'file-get-contents' rather than a new cURL routine to read the directories containing the layers.

Hi Jerry,

I have Version 3d (20151129) - wxusradar-hanis-iframe3.php on my server which is seemingly showing the layers that contain the Legend, Warnings, and Radar when running the script. Is there a newer version I should be using for added features? http://whitsweb.com/wxusradars-hanis3-sa.php

I did modify my php.ini to set 'allow_url_fopen = on' when I first installed the script and found I had a problem.

Thanks again for your help.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 29, 2015, 07:50:21 PM
We still have work to do, Randy.  Your 'Stand-Alone' version isn't showing the layers that contain the Legend, Warnings, and Radar.  It's only showing the last images which are 'hard-coded' into the script.  I see via 'phptest.php' you have 'allow_url_fopen = on' in your 'php.ini', so that shouldn't be the problem.

For some reason you didn't upload the latest version of 'wxusradar-hanis-iframe3.php (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view)' because your old version is still using 'file-get-contents' rather than a new cURL routine to read the directories containing the layers.

Hi Jerry,

I have Version 3d (20151129) - wxusradar-hanis-iframe3.php on my server which is seemingly showing the layers that contain the Legend, Warnings, and Radar when running the script. Is there a newer version I should be using for added features? http://whitsweb.com/wxusradars-hanis3-sa.php

I did modify my php.ini to set 'allow_url_fopen = on' when I first installed the script and found I had a problem.

Thanks again for your help.
All looks good on your website. ☺I think you're done.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 29, 2015, 08:20:38 PM
Minor picky-picky, Randy. Yours is not showing the current radar site status info. It's normally located right under the buttons at the top. See http://tiggrweather.net/wxusradars-hanis3.php (I have modified the status display from what Jerry authored).
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 29, 2015, 10:21:51 PM
Minor picky-picky, Randy. Yours is not showing the current radar site status info. It's normally located right under the buttons at the top. See http://tiggrweather.net/wxusradars-hanis3.php (I have modified the status display from what Jerry authored).

Hi John,

I see you have the current radar status displayed. Would you care to share what modifications you've made to enable the display of the radar status? It seems that the 'radar-status-getradar.php' script should be doing the job, but I can't get it to work.

Could it be a problem I'm running stand alone rather than using the template?

Any help would be appreciated.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 30, 2015, 02:09:55 AM
Hi Randy,

Looking at the code I don't see where running standalone would disallow the radar status to run. The call to that script is in place and you have it uploaded to your server. Is Denver your correct time zone (but that would not stop the script from running)?

I don't see what's wrong, but Jerry is the expert here as to should it work with the SA script.

Sorry.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on November 30, 2015, 09:35:01 AM

Looking at the code I don't see where running standalone would disallow the radar status to run. The call to that script is in place and you have it uploaded to your server. Is Denver your correct time zone (but that would not stop the script from running)?

I don't see what's wrong, but Jerry is the expert here as to should it work with the SA script.

Sorry.

I did get the script where it does display the radar status now John, it's now just a matter of getting the proper settings in the style sheet to display it as I'd like.

Thanks
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 30, 2015, 11:44:23 AM
Glad you got it running and sorry I wasn't able to help.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: MBYWxWatcher on February 21, 2016, 06:48:52 PM
Jerry,

Thank you for the great scripts! I have the /HAniS directory and all files uploaded to the root directory. I'm planning on running the script stand-alone and made the required changes to display my location to wxusradars-hanis3.php. I have also checked to ensure that the  'allow_url_fopen' is 'on' with the phptest.php.

The radar is displayed but only the last image shows the radar image (precipitation). Here is the script/location:

http://www.personalweatherstations.com/wxusradars-hanis3.php

I'ved tested the script on the above domain and on a staging domain with the same results. I'm sure I've missed something but I haven't found it yet. Could you point me in the right direction please?

Regards and thanks,
Tim
 
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 22, 2016, 07:59:26 AM
I think you've downloaded my old version and example 'wxusradars-hanis3-SA.php'.  Download and save the latest version 4a (20160214) (http://www.gwwilkins.org/wxusradars-hanis3.php?sce=view), the include script (http://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view), and the iframe script (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view) using these links.  Then in 'wxusradars-hanis3.php' set 'StandAlone = true;', and lets see if this works for you.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on February 22, 2016, 11:26:01 AM
I think you've downloaded my old version and example 'wxusradars-hanis3-SA.php'.  Download and save the latest version 4a (20160214) (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view), the include script (http://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view), and the iframe script (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view) using these links.  Then in 'wxusradars-hanis3.php' set 'StandAlone = true;', and lets see if this works for you.

Hi Jerry,

Do you have an updated version of 'wxusradars-hanis3.php' available for download?
 The first and third links you've posted both link to 'wxusradar-hanis-iframe3.php.'

Thanks,
Randy (W7RSW)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 22, 2016, 11:32:45 AM
Link updated - Sorry about that! #-o :oops:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: MBYWxWatcher on February 22, 2016, 09:57:16 PM
I think you've downloaded my old version and example 'wxusradars-hanis3-SA.php'.  Download and save the latest version 4a (20160214) (http://www.gwwilkins.org/wxusradars-hanis3.php?sce=view), the include script (http://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view), and the iframe script (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view) using these links.  Then in 'wxusradars-hanis3.php' set 'StandAlone = true;', and lets see if this works for you.

Jerry,

It works like a charm! I have in working stand-alone in an iFrame wrapper on the site and it looks great. Here's the link:

http://www.personalweatherstations.com/index.php/radar

Thank you for your help. Awesome script!

Tim


Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Jumpin Joe on March 04, 2016, 03:21:08 PM
I am getting an error while trying to use the script. Looks like I am missing "radar-status-getradar.php"   Anyone know where I can get it or send it to me?

Thanks,

Joe
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Maumelle Weather on March 04, 2016, 03:27:02 PM
Here ya go, Joe.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Jumpin Joe on March 04, 2016, 03:33:39 PM
Thanks John!!!

Joe
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on March 04, 2016, 11:33:28 PM
Okay, I'm obviously doing something wrong here. I have downloaded the latest the wxusradars-hanis3.php, inc-wxusradars-hanis3.php and radar-status-getradar.php files and uploaded them to my Saratoga template website. I also modified the default radar selection to be "rgx" for the Reno radar unit. However, all I get is the top of the "US and Territories Current NOAA Ridge Radar" heading along with the selection controls. Then, there is an area of blank and then four lines of text for the bottom of the screen. For whatever reason I am not seeing any of the radar images. I even went back to the original unmodified files and get the same thing - no radar images. No matter what radar site I select, I get the same results. It's probably something simple but so far, I haven't discovered what that "something" could be.
Any ideas?
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on March 05, 2016, 01:19:03 AM
You may be missing the iframe script, Don.  Download and save the latest version 4a (20160214) (http://www.gwwilkins.org/wxusradars-hanis3.php?sce=view), the include script (http://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view), and the iframe script (http://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view) using these links.  Then the fourth link I forgot to include is the necessary 'radar-status-getradar.php (http://www.gwwilkins.org/radar-status-getradar.php?sce=view)' which is the last piece of the puzzle. 

I didn't re-version the radar-status script because it's only slightly modified from Ken True's original version, 'radar-status.php'.  If he has to post a new version I'll need to incorporate those changes into 'radar-status-getradar.php'.  One side-effect of this script is the creation of a radar-status file in your cache directory for each different radar you visit with 'wxusradars-hanis3.php'.  It's not a big deal, but it could come as a surprise to the unwary.

Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on March 05, 2016, 08:42:47 AM
This morning I can see this message in the 'console' when 'Inspect'ing your page (<CTRL><SHIFT>i in Chrome and select the 'console' tab):
"Refused to display 'http://www.carsonvalleyweather.com/wxusradar-hanis-iframe3.php?radar=N0R&ra…&btnTextColor=white&animRate=20&pauseSeconds=2&numbImages=12&smoothingOn=1' in a frame because it set 'X-Frame-Options' to 'deny'."

Googling "Refused to display '...' in a frame because it set 'X-Frame-Options' to 'deny (https://www.google.com/?gws_rd=ssl#q=Refused+to+display+%27...%27+in+a+frame+because+it+set+%27X-Frame-Options%27+to+%27deny%27.)'" lists some possible answers, the most promising of which might be here (http://stackoverflow.com/questions/20498831/refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin).
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on March 05, 2016, 11:39:48 AM
Hi Jerry,

As far as I know, I have the latest versions of all of the four files you listed above. All four are installed but I don't see any radar images and I don't see any error messages with either Firefox or Chrome.

Will work on this more later this evening or tomorrow Won't be home most of the day.

Thanks for the pointers.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on March 05, 2016, 11:47:59 AM
The errors are hidden in the javascript console.  Once a javascript error occurs all javascript execution stops.  <CTRL><SHIFT>i in Chrome gets the 'Inspector' where the 'console' tab can be selected.

Another issue might be a missing '/HAniS/hanis_min.js'.  I've attached a zip of the required directory/file.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on March 05, 2016, 12:51:52 PM
Thanks Jerry, I was missing the HAniS folder and associated files. Working fine now. As a suggestion perhaps the whole routine needs to be zipped into a single file so everything needed is included in the ZIP file.

Thanks again!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on March 05, 2016, 01:40:28 PM
I have a bad habit of posting scripts fairly early in development, so the ?sce=view and <CTRL>s to acquire the latest versions seemed preferable to littering this thread with soon-to-be-outdated zips.  I've attached a Version 4a zip with the requisite files, but the instructions are sparse, so refer back to the first post in this thread.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on March 05, 2016, 09:11:55 PM
I have a bad habit of posting scripts fairly early in development, so the ?sce=view and <CTRL>s to acquire the latest versions seemed preferable to littering this thread with soon-to-be-outdated zips.  I've attached a Version 4a zip with the requisite files, but the instructions are sparse, so refer back to the first post in this thread.

Jerry,

I didn't mean to be over critical. I was just concerned that others, like myself, who are less experienced in programming would appreciate seeing a zip file that contains the entire release in the distribution. The other thing that really seems to help when there is a large number of discussions in a thread is to always place the latest release in the very first post of the thread. That is very easy to do and also allows the poster to update their comments showing basic changes made, tips, etc.. The biggest advantage of this is that it eliminates the need for the rest of us to have to hunt for the latest release in the multitude of posts in a thread.

And lastly, thanks so much for updating this particular offering. It is well done. I just wish I had the talents that you and others on this forum have for creating all of these neat packages that most of us enjoy adding to our website.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on August 03, 2016, 07:36:51 PM
The NWS has modified the radar-status URL thus requiring revision to 'radar-status-getradar.php'.  Please see this discussion (http://www.wxforum.net/index.php?topic=26301.msg295795#msg295795) to obtain the latest 'radar-status-getradar.php' script.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on September 24, 2016, 04:28:27 PM
Ken True has updated his 'radar-status.php' to accommodate the NWS's latest modifications to their pages.  Accordingly, the derivative 'radar-status-getradar.php (http://www.gwwilkins.org/radar-status-getradar.php?sce=view)' used by the 'wxusradars-hanis3.php' scripts has been modified as well.

The radar message has been left on via '$noMsgIfActive = false; // set to true to suppress message when radar is active'.  Also, don't forget to change the defaults to your preferred radar site.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on September 24, 2016, 04:35:51 PM
Thanks, Jerry. Will see what I can come up with...   :grin:  :roll:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Breezy on October 04, 2016, 03:57:01 PM
Thank you, Jerry!  :grin:

Jeff
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 19, 2017, 06:50:20 PM
Bad news!  This script has been rendered useless by the NWS 'https' transition.  I've left a message on the Ridge Radar page of the NWS site, but I'm not sure if that will do any good.  As it stands now none of the overlay, legend, or other radar specific files the animation needs are accessible.

If anyone has any useful contacts at the NWS maybe they could let them know that their ridge radar download instructions are now useless.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on February 19, 2017, 07:13:06 PM
Interesting. For the first 14 of 15 images I have no radar, but image 15, taken at 1701 MST, is completely correct for my current conditions. Maybe your comments to them worked?
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 19, 2017, 07:44:40 PM
That's because the last or current image is a complete image, not constructed using overlays.  It was just easier to use this image in the script.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on February 19, 2017, 10:26:02 PM
Got it. Confused because the date/time for that image keeps updating.

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Breezy on February 20, 2017, 08:31:57 AM
Jerry,

Thanks for the heads up. I took it off my menu.

Jeff
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 21, 2017, 03:06:25 PM
After the NWS 'https://' changes there were a couple of problems with this script in 'wxusradar-hanis-iframe3.php' that killed the animation even after I dropped in the correctly specified url's.  The CURL script wasn't working, so I purloined a couple of lines from get-nnvl-iod.php's CURL routine.  This still wasn't solving the problem because of associated 'a http' entries that weren't image names and which cluttered up the 'preg_match_all' function rendering it flummoxed and useless, like I was.  :-)

The solution was a simple addition to the regex specification changing it from '/(a href\=\")([^\?]*)(\")/i' to '/(a href\=\")([^\/\?]*)(\")/i'.

The revised script is working here on my site (http://www.gwwilkins.org/wxusradars-hanis3.php).  Possibly delayed loading is due to the 'radar-status-getradar.php (http://gwwilkins.org/radar-status-getradar.php?sce=view)' which is modified from Ken True's 'radar-status.php'  The only changes were to the iframe script (http://gwwilkins.org/wxusradar-hanis-iframe3.php) which can be downloaded, then saved using this link to the source (http://gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view).  It has been reversioned, as have the main (http://www.gwwilkins.org/wxusradars-hanis3.php?sce=view) and the includes script (http://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view) both of which are otherwise unchanged..
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W7RSW on February 21, 2017, 03:55:31 PM
After the NWS 'https://' changes there were a couple of problems with this script in 'wxusradar-hanis-iframe3.php' that killed the animation even after I dropped in the correctly specified url's.  The CURL script wasn't working, so I purloined a couple of lines from get-nnvl-iod.php's CURL routine.  This still wasn't solving the problem because of associated 'a http' entries that weren't image names and which cluttered up the 'preg_match_all' function rendering it flummoxed and useless, like I was...

Your updated script is working great on my site Jerry. Than you for your efforts in solving the problems afflicting your script.

I had tried updating the URL(S) in the 'wxusradar-hanis-iframe.php script but knew I would have to rely upon you or one of the other more knowledgeable coders to solve the problem when that change was unsuccessful.

A great script working again...thanks Jerry
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: satcop on February 21, 2017, 06:53:44 PM
Thank you Jerry;

The fix is working fine and now I have another page with that little green lock.

Bob
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on February 22, 2017, 12:03:03 PM
Just to be picky (because I haven't in a long time!  :roll: ) your 'using this link to the source' for wxusradar-hanis-iframe3.php brings a non-reversioned script showing Version 4b (20170121). Assuming just the date was missed as the script appears to be working at http://tiggrweather.net/wxusradars-hanis3.php.

Thanks for the fixes.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 22, 2017, 04:42:30 PM
Just to be picky (because I haven't in a long time!  :roll: ) your 'using this link to the source' for wxusradar-hanis-iframe3.php brings a non-reversioned script showing Version 4b (20170121). Assuming just the date was missed as the script appears to be working at http://tiggrweather.net/wxusradars-hanis3.php.

Thanks for the fixes.
Actually, John, I just fat-fingered it. #-o  The correct date is now in the file on my web site.  You can just manually change the date to '20170221' if you want. :-)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on February 22, 2017, 05:36:16 PM
Just wanted to be sure there were no changes in that script.

Thanks.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 22, 2017, 06:53:04 PM
Umm...well...there are some changes, enough so that I've reversioned the script to V5 20170222.  After Ken True posted his updated 'radar-status.php', I saw the need to incorporate his changes into this script's 'radar-status-getradar.php'.  Then it turns out that the Elgin AFT, FL radar site, KEVX, is going to be down all week so the site isn't generating any images at all.  KEVX proved to be a useful boundary test case in 'wxusradar-hanis-iframe3.php' as well as helping me with the status script.

All of the files except the HAniS directory are newly versioned with changes mainly to the above-mentioned scripts.  Load it up and try to look at the Elgin AFB, FL radar just to see what happens.  The iframe script will fall over if the number of images on the NWS server is less than the number of images requested or if there are no images at all, which happens to be the case currently with KEVX.  Requesting 26 images also causes the iframe script to fall over, as it will if there happen to be fewer images on the NWS server than are requested.

Don't forget to adjust the settings in 'wxusradars-hanis3.php' to your preferred site and parameters.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 23, 2017, 11:17:46 AM
To use SSL or Not?  You might find this interesting: https://www.nutsandboltsmedia.com/does-your-website-really-need-ssl/

If you're not allowing any user input or asking for any user input of potentially sensitive information, your site could still be hacked, but it's much more difficult to do.  I understand the 'trust' issue is important to many, but my site is what it is, SSL or Not.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 26, 2017, 12:24:04 AM
I finally scrolled down to the bottom of this page and discovered that I had placed an extra </div> in 'inc-wxusradars-hanis3.php' at line 795.  Here is the revised script (http://gwwilkins.org/inc-wxusradars-hanis3.php?sce=view).
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: RainAlwaysRain on February 26, 2017, 05:09:36 AM
Thanks for the quick fix on this.

By the way, a new Radar site came online for the Washington state coast a few years back. I keep adding this manually, just fyi:

Code: [Select]
<option value="lgx"<?php echo (($radarLoc=="lgx")?' selected="selected"':'')?>>Langley Hill</option>
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 26, 2017, 08:29:57 AM
Thanks for the quick fix on this.

By the way, a new Radar site came online for the Washington state coast a few years back. I keep adding this manually, just fyi:

Code: [Select]
<option value="lgx"<?php echo (($radarLoc=="lgx")?' selected="selected"':'')?>>Langley Hill</option>
Thanks for the heads-up!  I've added this site to the script and reversioned it '5a (20170226)'.

Somehow my zip file was corrupted!  This one should be OK.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Breezy on February 26, 2017, 11:42:32 AM
Great job Jerry. I have it back on my site !!!  \:D/

Jeff
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on February 26, 2017, 01:08:39 PM
Not that it's any big deal, but I mistakenly versioned 5a 20170126 rather than 20170226.

Fixed in the new 5a zip above.

Edit:  Somehow the first 5a zip was corrupted.  The new 5a above is OK.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Johnmac on March 05, 2017, 03:52:47 PM
I have downloaded what I believe to be the latest files for this script. I still only get the last frame showing the radar.

The page can be seen at www.scannorthcounty.net/wxusradars-hanis3.php

The wxusradars-hanis3-iframe3.php shows as version 3

Any suggestions as what I should check

Thanks, John


Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on March 05, 2017, 04:36:06 PM
The wxusradars-hanis3-iframe3.php shows as version 3
That filename is not exactly correct - should be wxusradar-hanis-iframe3. Perhps just a slip of the fingers, perhaps really the wrong file.

The correct files are in Jerry's 5a download a few messages up from this (you have to be logged in to see the link). Try downloading that again.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Johnmac on March 05, 2017, 05:15:17 PM
I have the correct file, I just copied the wrong file name. It did come from the link below.

Any other thoughts?

John
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on March 05, 2017, 07:27:13 PM
I have the correct file, I just copied the wrong file name. It did come from the link below.

Any other thoughts?

John
You've modified 'wxusradar-hanis-iframe3.php'.  Reload the original version that will default to 'KOAX' when loaded by itself.  This default will be overridden by your settings in 'wxusradars-hanis3.php' when the radar display is called by 'inc-wxusradars-hanis3.php'.  This set of scripts should run as intended when you modify ONLY the Settings section in the main script.  Same goes for 'inc-wxusradars-hanis3.php': reload the original version.

I can load your Boston radar on my site (http://www.gwwilkins.org/wxusradars-hanis3.php), so it should work as I've described.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Johnmac on March 05, 2017, 07:55:06 PM
I have the correct file, I just copied the wrong file name. It did come from the link below.

Any other thoughts?

John
You've modified 'wxusradar-hanis-iframe3.php'.  Reload the original version that will default to 'KOAX' when loaded by itself.  This default will be overridden by your settings in 'wxusradars-hanis3.php' when the radar display is called by 'inc-wxusradars-hanis3.php'.  This set of scripts should run as intended when you modify ONLY the Settings section in the main script.  Same goes for 'inc-wxusradars-hanis3.php': reload the original version.

I can load your Boston radar on my site (http://www.gwwilkins.org/wxusradars-hanis3.php), so it should work as I've described.

Made the corrections - now working as it should. Was reading too much into the instructions. Thanks for the assistance.

John
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on March 05, 2017, 07:58:09 PM
Glad we got it sorted out, John.  Enjoy! :-)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Jumpin Joe on March 06, 2017, 08:38:12 PM
I made all of the updates and everything appears to be working well.

However, I do not remember where to change the default radar site to my local radar KILN. Can anyone help?

Thanks,

Joe
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on March 06, 2017, 10:41:30 PM
...
However, I do not remember where to change the default radar site to my local radar KILN. Can anyone help?
...
Joe
In the main script, wxusradars-hanis3.php, there's a settings section:
Code: [Select]
/************************* Settings *****************************/
$radar = 'N0R'; // Default radar type is set here
$radarLoc = 'oax'; // IMPORTAMT!!! Default radar location is set here
Change 'oax' to your preferred radar location.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Jumpin Joe on March 06, 2017, 11:00:15 PM
...
However, I do not remember where to change the default radar site to my local radar KILN. Can anyone help?
...
Joe
In the main script, wxusradars-hanis3.php, there's a settings section:
Code: [Select]
/************************* Settings *****************************/
$radar = 'N0R'; // Default radar type is set here
$radarLoc = 'oax'; // IMPORTAMT!!! Default radar location is set here
Change 'oax' to your preferred radar location.

Thank you!

I knew it was simple, just couldn't remember which script.
All is good.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on June 08, 2017, 01:31:42 PM
This version, dated 20170427, uses a later version of HAniS that will skip any missing images, whose box at the bottom of the display then remains maroon.

Please review this thread if you experience problems with this script.

I've attached a zip in order to include an updated 'radar-status-getradar.php' and the appropriate HAniS script.  The zip includes no instructions, hence the need to review this thread.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on November 05, 2017, 06:53:45 PM
I know this is an older thread but I've just noticed that my radars are only displaying returns on the last frame. I seem to remember this being mentioned as a problem quite some time ago but I don't remember what the resolution, if any, was for the issue. Can someone please help refresh my memory on this? I am running the latest version of the wxusradars-hanis.zip script (20170427).

Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on November 05, 2017, 07:05:23 PM
I'm running the wxusradars-hanis3.php and its working. Version 5 (20170122)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: mldenison on November 06, 2017, 07:05:09 PM
I stumbled upon this thread and I really like the radar display.

Unfortunately, I'm a bit below mediocre when it comes to implementation.

I've got the files copied to my website.

I don't know how to integrate it into Saratoga.

I'm OK with creating a flyout item for it.

I just don't know the code snippet(s) required to fire it off.

Can anybody  post a snippet to show me what goes where?

Appreciate it.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on November 06, 2017, 10:41:57 PM
I stumbled upon this thread and I really like the radar display.

Unfortunately, I'm a bit below mediocre when it comes to implementation.

I've got the files copied to my website.

I don't know how to integrate it into Saratoga.

I'm OK with creating a flyout item for it.

I just don't know the code snippet(s) required to fire it off.

Can anybody  post a snippet to show me what goes where?

Appreciate it.

I use this, I'll include the top 2 lines also.
 
Code: [Select]
</item>
<item caption="Radar/Satellite">
 

  <item caption="Local and US Radar" link="wxusradars-hanis3.php" title="NOAA Ridge Radar"/>
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on November 06, 2017, 10:49:51 PM
I'm running the wxusradars-hanis3.php and its working. Version 5 (20170122)

Thanks Randy, however, I must have something setup wrong as I only see radar data for the last map frame. All other frames show only the map and no radar return data. I suspect there may be some kind of error causing this but I don't know enough about the code to troubleshoot it myself. I see this condition on any of the maps so it must be something pretty basic.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on November 06, 2017, 11:04:45 PM
I can't help either. If you haven't already download the new scripts on previous page again. Go back and read instructions again. I know some errors were corrected and you may have one that isn't.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 06, 2017, 11:50:31 PM
I know this is an older thread but I've just noticed that my radars are only displaying returns on the last frame. I seem to remember this being mentioned as a problem quite some time ago but I don't remember what the resolution, if any, was for the issue. Can someone please help refresh my memory on this? I am running the latest version of the wxusradars-hanis.zip script (20170427).
You're not running all of the latest scripts, Don.  Here (http://www.carsonvalleyweather.com/wxusradar-hanis-iframe3.php?sce=view) is your problem script.  You can get the scripts from my site: main saratoga template script (https://www.gwwilkins.org/wxusradars-hanis3.php?sce=view), includes script (https://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view), and the radar display script (https://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view). (As usual, right-click and 'Save as...' a php file rather than a text file.) The ONLY place you need to modify the settings is in the main script.  The setting parameters in the other two scripts are to allow stand-alone debugging.

I would suggest saving all three of the latest scripts while updating HAniS to at least Version 3.9 which changes are incorporated into this version of the radar script.  Attached is the Version from July 17, 2017.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on November 07, 2017, 12:33:29 AM
I know this is an older thread but I've just noticed that my radars are only displaying returns on the last frame. I seem to remember this being mentioned as a problem quite some time ago but I don't remember what the resolution, if any, was for the issue. Can someone please help refresh my memory on this? I am running the latest version of the wxusradars-hanis.zip script (20170427).
You're not running all of the latest scripts, Don.  Here (http://www.carsonvalleyweather.com/wxusradar-hanis-iframe3.php?sce=view) is your problem script.  You can get the scripts from my site: main saratoga template script (https://www.gwwilkins.org/wxusradars-hanis3.php?sce=view), includes script (https://www.gwwilkins.org/inc-wxusradars-hanis3.php?sce=view), and the radar display script (https://www.gwwilkins.org/wxusradar-hanis-iframe3.php?sce=view). (As usual, right-click and 'Save as...' a php file rather than a text file.) The ONLY place you need to modify the settings is in the main script.  The setting parameters in the other two scripts are to allow stand-alone debugging.

I would suggest saving all three of the latest scripts while updating HAniS to at least Version 3.9 which changes are incorporated into this version of the radar script.  Attached is Version 4.6

THANK YOU Jerry!!! It's just amazing how some current code makes things magically work again! I uploaded all of the files you mentioned and updated to HAniS 4.6. Guess I didn't have the right mix of code and couldn't figure out where to go next.

Again, thanks for the help - that's what I love about this forum. There is always someone ready to lend a hand to those of us who are challenged...
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: mldenison on November 07, 2017, 07:52:23 AM

I use this, I'll include the top 2 lines also.
 
Code: [Select]
</item>
<item caption="Radar/Satellite">
 

  <item caption="Local and US Radar" link="wxusradars-hanis3.php" title="NOAA Ridge Radar"/>

I appreciate it.  That's what I had in my flyout menu but it's not working: https://www.m82a1.us/wxusradars-hanis3.php (https://www.m82a1.us/wxusradars-hanis3.php)

I'm guessing it's a setting in one of the files?  I believe I have the latest files uploaded.

 [ You are not allowed to view attachments ]
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on November 07, 2017, 08:04:16 AM
Go to Jerry's post above #154 and download all the files needed and install, you probably have something missing.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 07, 2017, 08:47:26 AM
Also, see this post (http://www.wxforum.net/index.php?topic=27077.msg260880#msg260880) in this thread...

Save this snippet
Code: [Select]
<?php phpinfo(); ?>as 'phptest.php' and place it on your site.  It will tell you the status of your site's php and php.ini file when you run it.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 07, 2017, 11:05:43 AM
Jerry,

Well, this isn't nice. Updated from v5 (working) to v5a (now not working) and the new hanis (4.6?) using your links above. Comes up but blue 'loading images' bar stops at varying progress marks and the images do not appear. By putting back the previous hanis things work fine. http://tiggrweather.net/wxusradars-hanis3.php

FYI but thoughts appreciated.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ValentineWeather on November 07, 2017, 11:12:37 AM
Interesting. I never did the latest update because mine was working also.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 07, 2017, 11:22:24 AM
Interesting. I never did the latest update because mine was working also.
After all this time one would think I had learned to leave things alone!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: mldenison on November 07, 2017, 11:28:27 AM
Go to Jerry's post above #154 and download all the files needed and install, you probably have something missing.

That did the trick.

I got the freezing as others have gotten (above) and fixed that with the earlier hanis js files.

I appreciate the help!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: mldenison on November 07, 2017, 11:44:57 AM
Also, see this post (http://www.wxforum.net/index.php?topic=27077.msg260880#msg260880) in this thread...

Save this snippet
Code: [Select]
<?php phpinfo(); ?>as 'phptest.php' and place it on your site.  It will tell you the status of your site's php and php.ini file when you run it.

And thanks for this.  It alleviated a call to GoDaddy about the fopen setting!
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 07, 2017, 02:46:06 PM
I left for the funeral of a nurse-colleague of many years at 10 AM, and just now returned, so I've been out of the loop.

I will replace the latest HAniS version with the one I'm using from July 7, 2017.  I don't know the version number and Tom Whitaker's HAniS site doesn't list the dates of the versions.

Sorry about putting up a version untested by me. :oops:
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 07, 2017, 02:56:13 PM
One other thing I should mention.  You can set up this script to run 'stand alone' by setting in the main script Settings
Code: [Select]
$standAlone = false; // false if we run in the template environment
to
Code: [Select]
$standAlone = true; // false if we run in the template environment
.  It's called 'wxusradars-hanis3-SA.php (https://www.gwwilkins.org/wxusradars-hanis3-SA.php)' on my site.  Ergo, no template is then needed to run the scripts.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on November 07, 2017, 03:23:44 PM
Sorry about putting up a version untested by me. :oops:
Not a problem in my book, Jerry, and no disrespect intended, but since whatever version I reverted to is running without problem I'll just stay with it. "If it ain't broke...".
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: W3DRM on November 08, 2017, 01:02:16 AM
I left for the funeral of a nurse-colleague of many years at 10 AM, and just now returned, so I've been out of the loop.

I will replace the latest HAniS version with the one I'm using from July 7, 2017.  I don't know the version number and Tom Whitaker's HAniS site doesn't list the dates of the versions.

Sorry about putting up a version untested by me. :oops:

Jerry,

My version is now hanging. Where do I find the July 7, 2017 version of the HAniS code? I'm running the July 17, 2017 version at the moment.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on November 08, 2017, 07:46:13 AM
Jerry,

My version is now hanging. Where do I find the July 7, 2017 version of the HAniS code? I'm running the July 17, 2017 version at the moment.
That's the version I'm running, 20170717 (YMD because that's the only way to get a useful sort of a series of files that incorporate dates).

Not only is this script hanging on your site, but it's crashing my browser, Chrome, right now.  Something else appears to be going on here.  I would re-upload all three of the scripts along with the HAniS directory.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Bunty on December 01, 2017, 11:39:26 PM
Mine isn't working:  https://stillwaterweather.com/wx/wxusradars-hanis3.php (https://stillwaterweather.com/wx/wxusradars-hanis3.php) 

Using version 5 and checked phptest.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: mkutche on December 02, 2017, 12:03:07 AM
mine seems to work.. http://gosportwx.com/wxusradars-hanis3.php (http://gosportwx.com/wxusradars-hanis3.php) although every now and then I keep getting undefined offsets on line 158 of radar-status.php
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: jgillett on December 02, 2017, 12:16:32 AM
Mine still working. See http://www.wxforum.net/index.php?topic=27077.msg335874#msg335874 re: my backing down the hanis file one version.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: Bunty on December 02, 2017, 04:36:32 AM
Mine isn't working:  https://stillwaterweather.com/wx/wxusradars-hanis3.php (https://stillwaterweather.com/wx/wxusradars-hanis3.php) 

Using version 5 and checked phptest.

Oops, sorry. My initial install must have gone bad.  I reinstalled it and all is fine now!

A look at my stand alone version:  https://stillwaterweather.com/usradars (https://stillwaterweather.com/usradars)
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ALITTLEweird1 on December 03, 2017, 02:15:30 PM
I got the radar script up and running,  but the zoom button doesn't seem to do anything.  Did i miss something?

https://www.northbendweather.com/wxradar.php
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on December 03, 2017, 02:23:40 PM
I got the radar script up and running,  but the zoom button doesn't seem to do anything.  Did i miss something?

https://www.northbendweather.com/wxradar.php
Zooming in HAniS is a two-step process.  Click 'Zoom' and then click on the map where you want to see it enlarged.  Repeat clicking on the map as necessary/desired.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: ALITTLEweird1 on December 03, 2017, 02:34:31 PM
Awwww.... cool,  thanks Jerry.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: 92merc on December 05, 2017, 12:54:51 PM
Not getting mine to work.  Getting blank page.  I have the July HANIS zip contents uploaded.

Just blank.

http://www.bismarckweather.net/wxusradars-hanis3.php
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: 92merc on December 05, 2017, 12:58:35 PM
I missed the HAniS subfolder.  I got that corrected.

But I'm still getting a "radar data temporarily unavailable..." message.  Is that because my local radar was down for awhile?
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on December 05, 2017, 01:28:20 PM
I missed the HAniS subfolder.  I got that corrected.

But I'm still getting a "radar data temporarily unavailable..." message.  Is that because my local radar was down for awhile?
Looking good here as of 12:28pm CST...Must have been the radar feed.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: 92merc on December 05, 2017, 02:25:17 PM
I still see it briefly when the loop starts.  But it appears to only be one image. 

Local radar was down from the 24th until just yesterday.  It appears they were up and down this morning. Now maybe working.

If it stays working, I'll probably put this radar up on my site.  I like it a bit better than the WU version.  With WU problems, it's good to have an alternative.  Just can't rely on them much anymore.
Title: Re: UPDATED: Script to Display US and Territories Radar Using HAniS
Post by: gwwilk on July 09, 2018, 05:46:42 AM
I've posted a slightly modified version, dated today, of this script, wxusradars-hanis3.zip (https://www.gwwilkins.org/gwwScripts.php).  The only revision was in the includes file.  The link(s) to the NWS Alerts Map and Current Legend were updated.  In addition the version number aka date was refreshed on the entire script.