WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: gwwilk on July 30, 2015, 03:53:05 PM

Title: GRLevel3 Animation via HAniS
Post by: gwwilk on July 30, 2015, 03:53:05 PM
Thanks to the diligent work by Tom Whittaker I was able to find his HAniS HTML5 Animation package.  Using his HAniS.js and excellent examples and instructions I was able to modify my Three-In-One FlAniS GRLevel3 Flash Animation to create a HAniS HTML5 Animation package (http://www.gwwilkins.org/wxgr3hanis.php).

The 'wxgr3hanis.txt' Readme file:

This package displays GRLevel3 images using HTML5 animations via HAniS by Tom Whittaker.  This HTML5 animation package does everything necessary to animate the GRLevel3 images.  This Version 2, dated 20150815, adds a Standalone option as well as a variable pause, an image display rate, and a setting to display a variable number of images. The Standalone option, '$standAlone = false;         // false if we run in the template environment', is the first active line following the introductory comments.


The package now includes 'wxgr3hanis.php' which is the main template file,
   'inc-gr3hanis.php' which contains the display logic and calls
   'wxgr3hanis-iframe.php' in an iframe,
   this file 'wxgr3hanis.txt'
   and /HAniS/hanis_min.js.
   
The 'gr3radar-hanis-select.php' file has been integrated into 'inc-gr3hanis.php' and may be removed from your site.

The updated Settings to possibly customize in wxgr3hanis.php Version 2 now include:
/************************* Settings *****************************/
$radar = 'br1'; // Default radar type is set here
$radarLoc = 'koax'; // IMPORTAMT!!! Default radar location is set here
$useRadarLoc = true; // Does your site include the radar location in the file name? true or false
$imageDir = 'grlevel3'; // Location of GRLevel3 images on server
$imageWidth = 620; // Width of radar images
$iframeWidth = 637; // Default IFrame Width -- adjust as needed
$iframeHeight = 695; // Default IFrame Height -- adjust as needed
$autoRefresh = true; // Use Autorefresh? true or false
$autoRefreshTime = 8; // Number of minutes between autorefreshes.  IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!!
$autoRefreshDefaultOff = true; // Begin with Autorefresh Off? true or false
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'darkslategray'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
############################ New in Version 2 ##########################
$pauseSeconds = 2; // Pause on last image, in seconds
$animRate = 20; // Frame Rate of animation: 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with integer
$numbImages = 10; // Number of images to display - between 3 and the number of images you are uploading
/*********************** End Settings ***************************/

Your GRLevel3 image size may differ from mine, 620px by 620px.  You should enter your image width in the $imageWidth Setting above.  Subsequent adjustments of $iframeWidth and $iframeHeight may then be needed.

If you haven't included the radar location in your filenames, set $useRadarLoc = false.

Modification of 'inc-gr3hanis.php' will probably be needed to comment out (<!--...-->) those image sequences that aren't available on your site.

To install the script after customizing 'wxgr3hanis.php':
   Copy the files in the /images folder to your site's /images folder, and
   Copy the three php scripts to your site's root folder.
   Copy the /HAniS folder to your site's root folder.

Also download the explanatory PDF in the second post of the thread to place in the /images folder as well.


Original Version 1 July 30, 2015 by SE Lincoln Weather

ChangeLog:

-------------------
Version 20150731:
a) Changed image naming by using getUniqueImageURL() in 'wxgr3hanis-iframe.php' to prevent browser caching.
b) Neither the auto-refresh or on-demand refresh buttons worked, so they have been removed.  A kludge refresh method is instead offered until such time as the HAniS.js methods have been perfected.
c) There was a long-standing error in the 'gr3radar-hanis-select.php' regarding Total Storm Rainfall, and it has been corrected there as well as in 'inc-gr3hanis.php'.
d) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

Version 20150801
a) Discovered the setting in HAniS which disables browser caching and thereby activates 'Refresh' and 'AutoRefresh'.
   i)    Restored 'Refresh' and 'AutoRefresh' buttons to display
   ii)   Added AutoRefresh switch, '$autoRefresh', to Settings
   iii)   Added AutoRefresh interval, called '$autoRefreshTime', to Settings
b) Added $imageWidth parameter to Settings to simplify customization
c) Added $useRadarLoc parameter to Settings in case your file names don't include the radar site
d) Removed Kludge Refresh method
e) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

Version 20150801b
a) Added automatic $iframeHeight adjustment when not using Autorefresh
b) Added $autoRefreshDefaultOff parameter to Settings to enable a default Autorefresh Off
c) Added $bgndColor parameter to Settings to enable easier HAniS background color changes
d) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

Version 20150802
a) Modified link in 'inc-wxgrehanis.php' which displays 'wxusalerts.php' to display http://www.weather.gov/'if 'wxusalerts.php' isn't present.
b) Added 'Select Auto Refresh Interval' to script.  If Auto Refresh is Disabled by default, it will be automatically enabled with the new Refresh Interval.  At times of intense nearby storm activity the NWS Radar can sometimes update at two minute intervals.  On the other hand, when there is little nearby activity a 30 minute interval could suffice.  Your default Auto Refresh Interval will display initially, even when Auto Refresh is Disabled by default.
c) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

Version 20150803
a) Fixed bug where Auto Refresh Interval selector displayed when '$autoRefresh' was off.
b) Modified file from Version 20150802:
   i)   gr3radar-hanis-select.php
c) Modified files from 20150801 Versions:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

Version 20150804
a) Changed Auto Refresh Interval selector appearance.
b) Added Settings for Button Color and Button Text Color in 'wxgr3hanis.php' Settings.  There is no setting in HAniS to change the 'toggle' square colors, blue and orange.  HTML Color Names are listed at http://www.w3schools.com/html/html_colornames.asp and when passed to an iframe cannot be specified using hex numbers, only Color Names.
c) Modified files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

Version 20150810
a) Folded gr3radar-hanis-select.php into inc-gr3hanis.php, eliminating the first file.
b) This also eliminated the need to manually modify 'selected="selected"' statements.
c) A user was getting duplicate displays when changing radar or interval.
d) Modified files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php eliminated -- delete from server
   iii)   inc-gr3hanis.php
-------------------

Version 2 20150815
a) Added '$pauseSeconds' which indicates the number of seconds to pause after the last image.
b) Added '$animRate' to vary the animation rate. 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with integer.
c) Added '$numbImages' to vary the number of images to display - set between 3 and the number of images you are uploading.
d) Added '$btnColor' and '$btnTextColor' control of the Selectors so they match the HAniS buttons.
e) Added Standalone capability.
f) Modified files:
   i)   wxgr3hanis.php
   ii)   inc-gr3hanis.php
   iii)   wxgr3hanis-iframe.php
   iv)   wxgr3hanis.txt (this file)
-------------------

Some slight changes for improved alignment and viewing.

Version 2a 20150823:
a) Found 'margin' of 8px around 'wxgr3hanis-iframe.php' that was throwing the image and <iframe> out of alignment.  Removed margin and '$iframeWidth' now equals '$imageWidth' and shouldn't need adjustment.
b) Added Stand Alone version, 'wxgr3hanis-SA.php', for optional use on tablets - no template may yield better viewing.
c) Cleaned up some other centering issues, especially in the Stand Alone version.
d) Modified files:
   i)   wxgr3hanis.php - update after preserving your customized Settings
   ii)   inc-wxgr3hanis.php - replace existing file
   iii)   wxgr3hanis-iframe.php -replace existing file
   iv)   wxgr3hanis.txt (this file)
e) New file: 'wxgr3hanis-SA.php' for optional use
-------------------
   
Version 2b 20150825
a) Tom Whittaker has added the ability to specify the color for toggle squares to HAniS 2.6 released today.  Your '$btnColor' (button color) will now also modify the toggle button color.
b) For compatibility with possible future enhancements, a forward slash, '/', MUST NOW be used with this version when specifying the GRLevel3 image directory.
c) HAniS Version 2.6 is included in the HAniS directory.
d) Cleaned up a residual CSS validation issue.
e) modified files:
   i)   wxgr3hanis.php & wxgr3hanis-SA.php - update after preserving your customized Settings and adding a '/' to your images directory specication
   ii)   wxgr3hanis-iframe.php - replace existing file
   iii)   /HAniS/hanis_min.js - replace existing file
   iv)   wxgr3hanis.txt (this file)


Version 2 20150815, Version 2a 20150823, and Version 2b 20150825 are attached.


Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 30, 2015, 03:53:32 PM
Here's the explanatory PDF required by 'wxgr3hanis.php'.
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 30, 2015, 04:45:23 PM
Thats great Jerry.

I had someone ask me for a different radar package on my site because of the issues with flash. Got a weekend project now.
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 31, 2015, 10:37:01 AM
Are you on GoDaddy because that's a recurring issue with images Jerry.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 11:17:38 AM
It looks like it's a browser cache issue.  On this desktop I use CCleaner to wipe my browser cache each time I close the browser, and I've experienced no such problem with stale images.  My fix didn't seem to faze Chrome on my Nexus 9 because it still served stale images until I refreshed the page. :-(
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 31, 2015, 12:31:01 PM
Tried this and I'm getting a blank iFrame so far. http://www.cnyweather.com/wxgr3hanis.php

My images are in the GR32 directory

$radar = 'br1'; // Default radar type can be set here
$radarLoc = 'ktyx'; // Default radar location can be set here
$imageDir = 'GR32'; // Location of GRLevel3 images on server
$iframeWidth = 637; // Default IFrame Width -- adjust as needed
$iframeHeight = 685; // Default IFrame Height -- adjust as needed
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 12:53:33 PM
The blank frame occurs when your iframe dimensions are too small to accommodate the image.  Set scrolling="auto" in 'inc-wxgr3hanis.php' line 53 and then increase the iframe dimensions in 'wxgr3hanis.php' until the scrollbars disappear.  This will give you a starting place to then decrease the iframe dimensions by the width or height of the now-absent scroll bars if you so desire.
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 31, 2015, 01:02:16 PM
I changed that and made the iFrame 800 x 800 for the heck of it. My images are 650 x 650 and it's blank still.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 01:32:14 PM
Try Setting   '<body style="width:620px" onload="HAniS.setup(' of 'wxgr3hanis-iframe.php' to 650.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 02:00:34 PM
I have posted a revised version, dated today, in the first post above.

ChangeLog:

-------------------
Version 20150731:
a) Changed image naming by using getUniqueImageURL() in 'wxgr3hanis-iframe.php' to prevent browser caching.
b) Neither the auto-refresh or on-demand refresh buttons worked, so they have been removed.  A kludge refresh method is instead offered until such time as the HAniS.js methods have been perfected.
c) There was a long-standing error in the 'gr3radar-hanis-select.php' regarding Total Storm Rainfall, and it has been corrected there as well as in 'inc-gr3hanis.php'.
d) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

I tried using jQuery '$("select").bind('click',function () {' in wxgr3radar-hanis-select.php, but each click on the dropdown caused a refresh of the images which was disconcerting to say the least. :-)
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 31, 2015, 02:16:11 PM
No go. i'll play with it some more. I have a feeling it's a path thing to the images.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 02:24:06 PM
This is your iframed output:
Code: [Select]
<body style="width:650px" onload="HAniS.setup(
'filenames = ./GR32/ktyx_br1_9.jpg, ./GR32/ktyx_br1_8.jpg, ./GR32/ktyx_br1_7.jpg, ./GR32/ktyx_br1_6.jpg, ./GR32/ktyx_br1_5.jpg, ./GR32/ktyx_br1_4.jpg, ./GR32/ktyx_br1_3.jpg, ./GR32/ktyx_br1_2.jpg, ./GR32/ktyx_br1_1.jpg, ./GR32/ktyx_br1_0.jpg \n\
controls = startstop, speed, step, looprock, zoom \n\
controls_style = display:flex;flex-flow:row; \n\
buttons_style = flex:auto;margin:2px; \n\
bottom_controls = toggle \n\
bottom_controls_tooltip = Toggle frames on/off \n\
bottom_controls_style = background-color:gray;' ,
'handiv')">

  <div id="handiv" style="width:650px;background-color:#808080;" align="center" tabindex="0">
  <div align="center" style="display:flex;flex-flow:row;"><button style="flex:auto;margin:2px;undefined">Start</button><button style="flex:auto;margin:2px;undefined">-</button><button style="flex:auto;margin:2px;undefined">+</button><button style="flex:auto;margin:2px;undefined">&lt;</button><button style="flex:auto;margin:2px;undefined">&gt;</button><button style="flex:auto;margin:2px;undefined">Rock</button><button style="flex:auto;margin:2px;undefined">Zoom</button></div><div style="position:relative;border:0px;margin:0px;padding:0px;-webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; -webkit-tap-heightlight-color:transparent;"><canvas style="position:absolute;top:0;left:0;z-index:1;"></canvas><canvas style="position:absolute;top:0;left:0;z-index:2;"></canvas></div><div align="center" style="background-color:gray;"></div><div style="position: relative; border: 0px; margin: 0px; padding: 0px; -webkit-user-select: none; background-color: gray;" align="center" title="Toggle frames on/off"><canvas height="20"></canvas></div></div>
</body>
Selecting '/GR32/ktyx_br1_8.jpg' and placing it in the address bar of your site which yields 'http://www.cnyweather.com/GR32/ktyx_br1_8.jpg' gives me a message that the image is no longer available.  If indeed that's the correct directory the image should display with that url.
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 31, 2015, 02:46:52 PM
My GR3 radar images dont have the radar location in the url Jerry.


http://www.cnyweather.com/GR32/br1_8.jpg
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 03:02:15 PM
My GR3 radar images dont have the radar location in the url Jerry.


http://www.cnyweather.com/GR32/br1_8.jpg
So modify line 46 in 'wxgr3hanis-iframe.php' to remove the location.  Change
Code: [Select]
$image = './'.$imageDir.'/'.$radarLoc.'_'.$radar.'_'.$i.'.jpg';
to
Code: [Select]
$image = [code]'./'.$imageDir.'/'.$radar.'_'.$i.'.jpg';
[/code]
Oops.  :oops: I just remembered that you're using Version 1.  Find the string
Code: [Select]
'./'.$imageDir.'/'.$radarLoc.'_'.$radar.'_'.$i.'.jpg'and change it to
Code: [Select]
'./'.$imageDir.'/'.$radar.'_'.$i.'.jpg'
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 31, 2015, 03:13:10 PM
That fixed it Jerry. Now time to fix up the look.  TY!
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 03:20:58 PM
That fixed it Jerry. Now time to fix up the look.  TY!
I see you're now off and running.  =D&gt; Now to back down your iframe width and height to more reasonable numbers.  Your iframe is centered, but it's kinda big. :-)

I would urge you to move to today's version, preserving your changes of course, so you and your users don't encounter stale images.  The 'STR' total storm rain bug bites you, i.e. there's no accompanying text and the dropdown's 'SHR' is incorrect.

And there's a second width to change at around line 37 in 'wxgr3hanis-iframe.php':
Code: [Select]
  <div id="handiv" style="width:620px;background-color:#808080;">
--sorry about that.
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on July 31, 2015, 04:09:21 PM
Thanks!

I'll have to look when I get home and see exactly what my image sizes are too.
Title: Re: GRLevel3 Animation via HAniS
Post by: Farmtalk on July 31, 2015, 06:03:17 PM
Absolutely awesome script! Thank you!  8-)

The only question I have is, my template is a bit on the smaller side, and for the HCA pics, I am having troubles making it fit. Any suggestions?
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 06:23:35 PM
Absolutely awesome script! Thank you!  8-)

The only question I have is, my template is a bit on the smaller side, and for the HCA pics, I am having troubles making it fit. Any suggestions?
Your <div id="showRadar"> is 628px wide rather than 600px wide.  Hunt down that value (628) and change it to 600 to see if that fixes your alignment problem.  Your images (http://www.fitzweather.com/wxgr3hanis-iframe.php?radar=br1&imageDir=/GR3&radarLoc=krlx) are only 600px wide.
Title: Re: GRLevel3 Animation via HAniS
Post by: tnwxman on July 31, 2015, 06:38:04 PM
Gerry,

Thanks for the great script. Working on it now. In the Nashville area we also have the Terminal Doppler Weather Radar TBNA. Can I incorporate all of the kohx and tbna selections into one drop down menu or do you recommend a second page. If so how would I call that one without getting kohx.

Thanks.

Bob
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 31, 2015, 07:12:34 PM
Gerry,

Thanks for the great script. Working on it now. In the Nashville area we also have the Terminal Doppler Weather Radar TBNA. Can I incorporate all of the kohx and tbna selections into one drop down menu or do you recommend a second page. If so how would I call that one without getting kohx.

Thanks.

Bob
If these products follow the same naming conventions it would be possible to incorporate all of your radar products into the HAniS package, but it would require patience and work on your part.  Steps would be:
1)  Using the existing radar types in 'gr3radar-hanis-select.php' as models you can create an additional
Code: [Select]
    <optgroup label="Terminal Doppler Radar">
...
Code: [Select]
    </optgroup> between which you add your new Terminal Doppler Weather Radar TBNA products.

2)  Add the products to the 'inc-gr3hanis.php' by copying the last 'else if'
Code: [Select]
    } elseif ($radar == 'dsd') {
      $radarText = 'Digital Storm Total Rainfall';
    }
and pasting it however many times you need to accommodate your additional radar types.

3)  Modify the entries one by one so each contains the appropriate $radar and $radarText.

4)  There might be some helpful explanatory graphics you could conditionally display beneath the radar animation as I've done with some of the Dual-Pole products
Code: [Select]
<?php if (($radar=='hca1')||($radar=='hhc')) { ?>
...
Code: [Select]
<?php } else if ($radar=='cc1') { ?>
etc.

5)  Test your work.


If these products use different naming conventions, then a separate page might be necessary.

Good Luck, and let us see how it turns out.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 01, 2015, 10:06:50 AM
An updated easier to configure version is attached to the first post in this thread (http://www.wxforum.net/index.php?topic=26960.msg259455#msg259455).

ChangeLog:
-------------------
Version 20150801
a) Discovered the setting in HAniS which disables browser caching and thereby activates 'Refresh' and 'AutoRefresh'.
   i)    Restored 'Refresh' and 'AutoRefresh' buttons to display
   ii)   Added AutoRefresh switch, $autoRefresh, to Settings
   iii)   Added AutoRefresh interval, $autoRefreshTime, to Settings
b) Added $imageWidth parameter to Settings to simplify customization
c) Added $useRadarLoc parameter to Settings in case your file names don't include the radar site
d) Removed Kludge Refresh method
e) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

I would urge anyone who has downloaded a prior version to replace it with this version.  You can see it here (http://gwwilkins.org/wxgr3hanis.php).
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 01, 2015, 11:06:56 AM
Jerry, I've got something messed up.  ](*,) The radar  image is not showing. Albany, NY, KENX, has been down for 3 hours. Should the old image still show?

I had it running until I made your last file changes. 

http://indiantrailweather.com/wxgr3hanis.php

Jeff
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 01, 2015, 11:19:04 AM
Carefully review your Settings in 'wxgr3hanis.php', Breezy.  You're calling for the default location 'koax'.
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 01, 2015, 11:49:24 AM
I got it !!!  :grin: Great script Jerry  \:D/  Much thanks for your help !!!  =D&gt;
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 01, 2015, 01:21:27 PM
I've added some new options to version 20150801b in the first post above (http://www.wxforum.net/index.php?topic=26960.msg259455#msg259455).

Changelog:
-------------------
Version 20150801b
a) Added automatic $iframeHeight adjustment when not using Autorefresh
b) Added $autoRefreshDefaultOff parameter to Settings to enable a default Autorefresh Off
c) Added $bgndColor parameter to Settings to enable easier HAniS background color changes
e) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 01, 2015, 02:27:40 PM
Version 20150801b installed ... Geeez take a break  ...
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 02, 2015, 09:00:05 PM
Version 20150801b installed ... Geeez take a break  ...
Ok, Ok, Jeff.  :-) I think today's changes/enhancements will probably be the last unless a bug crops up.

The big reason for doing this is that Flash is dead on iOS and Android, and it's dying on PC's, while HAniS Animation runs on any platform.  It runs virtually everywhere.

I've cleaned up one bug in 'gr3hanis-radar-select.php' and also modified it as noted below.

Version 20150802
a) Modified link in 'inc-wxgrehanis.php' which displays 'wxusalerts.php' to display
http://www.weather.gov/ if 'wxusalerts.php' isn't present.
b) Added 'Select Auto Refresh Interval' to the script.  If Auto Refresh is Disabled by default, it will
be automatically enabled with the new Refresh Interval.  At times of intense nearby storm activity
the NWS Radar can sometimes update at two minute intervals.  On the other hand, when there is
little nearby activity a 30 minute interval would suffice because it isn't necessary to view the latest
available images ASAP.  Your default Auto Refresh Interval will display initially, even when
Auto Refresh is initially Disabled.
c) Modified Files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

Be sure to adjust the Settings to your preferences if you use this newest version.

You can see the latest version here (http://gwwilkins.org/wxgr3hanis.php) and get it here (http://www.wxforum.net/index.php?topic=26960.msg259455#msg259455).
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 03, 2015, 07:21:49 AM
Completed Version 20150802. Thank goodness for "Compare It". Looking good. It will be tested this afternoon and tonight.  \:D/

Jeff
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 03, 2015, 09:06:01 AM
Already a bug!  If $autoRefresh' is off, the Auto Refresh Interval selector shouldn't display!  This has been corrected in Version 20150803.

Version 20150803
a) Fixed bug where Auto Refresh Interval selector displayed when '$autoRefresh' was off.
b) Modified file from Version 20150802:
   i)   gr3radar-hanis-select.php
c) Modified files from 20150801 Versions:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php
-------------------

I would recommend updating all of the PHP scripts from this version, preserving your preferences of course.
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 03, 2015, 09:35:24 AM
Quote
Already a bug!  If $autoRefresh' is off, the Auto Refresh Interval selector shouldn't display!  This has been corrected in Version 20150803.

I updated the file  gr3radar-hanis-select.php but I don't notice any changes.

Jeff
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 03, 2015, 10:57:44 AM
Quote
Already a bug!  If $autoRefresh' is off, the Auto Refresh Interval selector shouldn't display!  This has been corrected in Version 20150803.

I updated the file  gr3radar-hanis-select.php but I don't notice any changes.

Jeff
You won't, Jeff, unless you set '$autoRefresh = false' in 'wxgr3hanis.php' Settings.  Then the auto-refresh related options all disappear.
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 03, 2015, 11:06:16 AM
Quote
You won't, Jeff, unless you set '$autoRefresh = false' in 'wxgr3hanis.php' Settings.  Then the auto-refresh related options all disappear.

Thanks.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 04, 2015, 09:56:23 AM
Messing around with Auto Refresh Interval selector appearance and button color and button text color today.

Version 20150804 (http://Version 20150804
a) Changed Auto Refresh Interval selector appearance.
b) Added Settings for Button Color and Button Text Color in 'wxgr3hanis.php' Settings.  There is no
setting in HAniS to change the 'toggle' square colors, blue and orange.  HTML Color Names are
listed at http://www.w3schools.com/html/html_colornames.asp and cannot be specified using hex
numbers, only Color Names.
c) Modified files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php)
a) Changed Auto Refresh Interval selector appearance.
b) Added Settings for Button Color and Button Text Color in 'wxgr3hanis.php' Settings.  There is no
setting in HAniS to change the 'toggle' square colors, blue and orange.  HTML Color Names are
listed at http://www.w3schools.com/html/html_colornames.asp and cannot be specified using hex
numbers, only Color Names.
c) Modified files:
   i)   wxgr3hanis.php
   ii)   gr3radar-hanis-select.php
   iii)   inc-gr3hanis.php
   iv)   wxgr3hanis-iframe.php

Be sure to adjust the Settings to your preferences when you update to a newer version.

You can see the latest version with '$autoRefresh' on here (http://gwwilkins.org/wxgr3hanis.php) and '$autoRefresh' off here (http://gwwilkins.org/wxgr3hanis-test.php).  The button colors and button text colors have been modified.

If you wish to restrict Auto Refresh use due to bandwidth considerations, you could save 'wxgr3hanis.php with '$autoRefresh = false' and save another version that isn't listed in your menu with '$autoRefresh = true' as 'wxgr3hanis-ar.php' or some such.
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 04, 2015, 02:31:18 PM
Another nice upgrade ... You really like this "HAniS" stuff ... Your grass must be getting long ...   :-k
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 04, 2015, 02:59:54 PM
Another nice upgrade ... You really like this "HAniS" stuff ... Your grass must be getting long ...   :-k
Thanks, Jeff.  Fortunately, I belong to a homeowners association and my monthly dues cover lawn care. :-)
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 04, 2015, 03:05:51 PM
I thought that was the reason for so many great scripts. They probably snowplow your driveway too ... Life is sweet ...
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 04, 2015, 11:42:34 PM
OK, Jerry - I give (gettin' too old for this).

Blank window. Suspect a problem with the image and iframe sizes, but can't seem to get it right (yes - 860 is correct for mu image size). However, if I select one of the weird ones like CC it does show up at the bottom. Running the version you put out today.

http://tiggrweather.net/wxgr3hanis.php

Thanks!
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 05, 2015, 12:03:43 AM
OK, Jerry - I give (gettin' too old for this).

Blank window. Suspect a problem with the image and iframe sizes, but can't seem to get it right (yes - 860 is correct for mu image size). However, if I select one of the weird ones like CC it does show up at the bottom. Running the version you put out today.

http://tiggrweather.net/wxgr3hanis.php

Thanks!
I'm afraid there's no 'wxgr3hanis-iframe.php' on your site:  http://tiggrweather.net/wxgr3hanis-iframe.php comes up empty whereas on my site http://gwwilkins.org/wxgr3hanis-iframe.php displays the buttons.

Scratch that.  The script can't find './HAniS/hanis_min.js' for some reason.
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 05, 2015, 02:13:14 AM
Interesting I did not see that error.

However, amazin' what can happen when one learns remembers how to properly upload a directory of scripts to the server.  #-o  Now to work on the proper sizes.

Tank U! 
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 05, 2015, 07:40:42 AM
Interesting I did not see that error.

However, amazin' what can happen when one learns remembers how to properly upload a directory of scripts to the server.  #-o  Now to work on the proper sizes.

Tank U!
You're welcome, John.  The problem only showed up when I 'inspected' your empty iframe in Chrome (<Ctrl><Shift>I) and viewed the 'Console'.

You're looking good now! 8-)
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 05, 2015, 12:31:43 PM
You're welcome, John.  The problem only showed up when I 'inspected' your empty iframe in Chrome (<Ctrl><Shift>I) and viewed the 'Console'.
Ahh, that explains it. Tried Chrome and wound up dumping it.

You're looking good now! 8-)

Yep, thanks to you. One more Flash item out of the way. Care to bring any others up to the HTML5 world?   :roll:
Title: Re: GRLevel3 Animation via HAniS
Post by: RickNY on August 06, 2015, 12:39:10 PM
Thanks, Jerry... This is great.. I've been waiting for an HTML5 version of this.

Two things I noted:

a) DualPole-QuickReference-MediaGuide.pdf doesn't appear to be in the distribution.  I found it at http://www.wdtb.noaa.gov/courses/dualpol/documents/QuickReference-MediaGuide.pdf and added it to my images folder.

b) The selector above the radar status is a little awkward, especially if there is a long status message.  I found it better to have the status message at the top of the page, followed by the selector..  Anyone else that wanted to know how to do it - remove <?php include("radar-status.php"); ?> from inc-gr3hanis.php and put it in wxgr3hanis.php above the two include lines already there, around Line 77.

http://www.indigopc.com/wxgr3hanis.php

Thanks,
Rick

Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 06, 2015, 01:03:19 PM
Thanks, Jerry... This is great.. I've been waiting for an HTML5 version of this.

Two things I noted:

a) DualPole-QuickReference-MediaGuide.pdf doesn't appear to be in the distribution.  I found it at http://www.wdtb.noaa.gov/courses/dualpol/documents/QuickReference-MediaGuide.pdf and added it to my images folder.
This was posted immediately following the script because the total file size with both was over the limit.  Glad you found it, and thanks for posting the link!
Quote
b) The selector above the radar status is a little awkward, especially if there is a long status message.  I found it better to have the status message at the top of the page, followed by the selector..  Anyone else that wanted to know how to do it - remove <?php include("radar-status.php"); ?> from inc-gr3hanis.php and put it in wxgr3hanis.php above the two include lines already there, around Line 77.

http://www.indigopc.com/wxgr3hanis.php

Thanks,
Rick
Good to see you're modifying the scripts to suit your preferences.  I'm glad it's working for you.  You may be interested in a HAniS version of the US Ridge Radars I posted here (http://www.wxforum.net/index.php?topic=27027.msg260099#msg260099).  It does away with Flash for the animation.  It doesn't display all of the radar variations that the 'wxgr3hanis.php' scripts can, but it will display all US radars.
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 10, 2015, 02:25:54 AM
Oops - just noticed this tonight, Jerry.

Script set to come up with CR, and it does that just fine. If I select a different radar type it does put that new type in place, but right below that is the CR type again.

Spent the last few hours going through the scripts but can't find it. Help?

http://tiggrweather.net/wxgr3hanis.php

Thanks.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 10, 2015, 07:43:06 AM
Oops - just noticed this tonight, Jerry.

Script set to come up with CR, and it does that just fine. If I select a different radar type it does put that new type in place, but right below that is the CR type again.

Spent the last few hours going through the scripts but can't find it. Help?

http://tiggrweather.net/wxgr3hanis.php

Thanks.
I see the problem, John, and it's puzzling.  First try fixing this (https://validator.w3.org/check?uri=http%3A%2F%2Ftiggrweather.net%2Fwxgr3hanis.php;accept=text%2Fhtml%2Capplication%2Fxhtml%2Bxml%2Capplication%2Fxml%3Bq%3D0.9%2Cimage%2Fwebp%2C%2A%2F%2A%3Bq%3D0.8;accept-language=en-US%2Cen%3Bq%3D0.8) to see if it's related.  When I view the page source it only shows one <iframe>, but when I use Chrome's right-click/Inspect element on one of the <iframes> both show up.

Try reloading to your server the supporting files from my source, 'gr3radar-hanis-select.php', 'inc-gr3hanis.php', and 'wxgr3hanis-iframe.php'.  If that fails, then reconfigure from my source 'wxgr3hanis.php' as desired and reload it to your server as well.
Title: Re: GRLevel3 Animation via HAniS
Post by: fourwatt on August 10, 2015, 11:38:18 AM
Awesome script Jerry,

Have it working here and added in the ability to select different sites.

Thanks again for another great script.

Ken

Link here http://www.kenaiweather.com/wxgr3hanis.php
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 10, 2015, 01:02:08 PM
Will let you know, Jerry.

Thanks.
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 10, 2015, 01:16:20 PM
You want puzzling? When I remove that </div> ALL other pages (because that's in the footer.php) on the site throw this...

Line 2009, Column 9: end tag for "div" omitted, but OMITTAG NO was specified

So there's one somewhere else that's causing that problem. Continuing with your plan...
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 10, 2015, 02:28:02 PM
Followed your instructions to the letter on the rest of the files. Still fails.

Other thoughts?

Thanks!
Title: Re: GRLevel3 Animation via HAniS
Post by: tmabell on August 12, 2015, 09:56:54 AM
Jerry, I may have missed something but it seems that there isn't a setting to adjust the default (start-up) loop speed.  Can this be added?
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 12, 2015, 10:04:52 AM
Jerry, I may have missed something but it seems that there isn't a setting to adjust the default (start-up) loop speed.  Can this be added?
Probably. :-)  I'll look into it.  I'm not happy with the speed controls as it is.  There's also a 'pause' at the end of the animation that's hardcoded and should probably be set optionally as well.  When I get time...
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 15, 2015, 07:40:56 PM
OK, Tom.  See the first post in this thread (http://www.wxforum.net/index.php?topic=26960.msg259455#msg259455).
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 16, 2015, 12:19:14 PM
Quote
OK, Tom.  See the first post in this thread.

OK Jerry, what might I have messed up? http://indiantrailweather.com/wxgr3hanis.php

The "auto refresh interval" is not showing.

Thanks.   :grin:

Jeff
 
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 16, 2015, 12:27:42 PM
Quote
OK, Tom.  See the first post in this thread.

OK Jerry, what might I have messed up? http://indiantrailweather.com/wxgr3hanis.php

Thanks.   :grin:

Jeff
Did you upload all of the files after modifying Settings to your requirements?  The new parameters aren't being passed to your 'wxgr3hanis-iframe.php'.
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 16, 2015, 12:38:39 PM
Quote
Did you upload all of the files after modifying Settings to your requirements?  The new parameters aren't being passed to your 'wxgr3hanis-iframe.php'.


Ooops. It's better now but the The "auto refresh interval" is not showing.
Title: Re: GRLevel3 Animation via HAniS
Post by: Breezy on August 16, 2015, 12:55:48 PM
All fixed. Bad setting.   \:D/

Thanks Jerry. Working great here after I got my "ducks in order".   =D&gt;
Title: Re: GRLevel3 Animation via HAniS
Post by: tmabell on August 16, 2015, 01:01:15 PM
I have it working very well here.  Many thanks Jerry!  Nice work to be sure.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 17, 2015, 09:53:00 AM
And as Tom has pointed out, CSS Validation fails because there's a missing 'px' in 'wxgr3hanis.php' here:
Code: [Select]
<div id="main-copy" style="width:<?php echo $imageWidth?>">
which should read
Code: [Select]
<div id="main-copy" style="width:<?php echo $imageWidth?>px">
Sorry about that! :oops:
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 18, 2015, 06:46:41 PM
Important!

Please see this post (http://www.wxforum.net/index.php?topic=27077.msg261300#msg261300) regarding the restoration of Ajax-Gizmo functionality.  (Thanks, Ken True!)
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 18, 2015, 07:12:56 PM
Jerry, given your post is here in GR3 territory I assume you're referring to that script. Have not had the gizmo problem here, and those two code lines are in the correct order in wxgr3hanis.php.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 18, 2015, 07:39:26 PM
Thanks, John.  That's good to know.  When I set up the StandAlone capability of the scripts I imported these from an existing script that obviously had them in the wrong order.  They may or may not be reversed, but my copy here was, so it doesn't hurt to check. :-)
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on August 18, 2015, 08:46:19 PM
Too bad it couldn't fix the 'other' problem...   :roll:
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 23, 2015, 04:40:51 PM
Some slight changes for improved alignment and viewing.

Version 2a 20150823 posted in top post here (http://www.wxforum.net/index.php?topic=26960.msg259455#msg259455):
a) Found 'margin' of 8px around 'wxgr3hanis-iframe.php' that was throwing the image and <iframe> out of alignment.  Removed margin and '$iframeWidth' now equals '$imageWidth' and shouldn't need adjustment.
b) Added Stand Alone version, 'wxgr3hanis-SA.php', for optional use on tablets - no template may yield better viewing.
c) Cleaned up some other centering issues, especially in the Stand Alone version.
d) Modified files:
   i)   wxgr3hanis.php - update after preserving your customized Settings
   ii)   inc-wxgr3hanis.php - replace existing file
   iii)   wxgr3hanis-iframe.php -replace existing file
   iv)   wxgr3hanis.txt (this file)
e) New file: 'wxgr3hanis-SA.php' for optional use
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 25, 2015, 02:42:26 PM
   
In Version 2b 20150825 above (http://www.wxforum.net/index.php?topic=26960.msg259455#msg259455):
a) Tom Whittaker has added the ability to specify the color for toggle squares to HAniS 2.6 released today.  Your '$btnColor' (button color) will now also modify the toggle button color.
b) For compatibility with possible future enhancements, a forward slash, '/', MUST NOW be used with this version when specifying the GRLevel3 image directory.
c) HAniS Version 2.6 is included in the HAniS directory.
d) Cleaned up a residual CSS validation issue.
e) modified files:
   i)   wxgr3hanis.php & wxgr3hanis-SA.php - update after preserving your customized Settings and adding a '/' to your images directory specication
   ii)   wxgr3hanis-iframe.php - replace existing file
   iii)   /HAniS/hanis_min.js - replace existing file
   iv)   wxgr3hanis.txt (this file)
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 05, 2015, 01:51:12 PM
Thanks Jerry;

Finally got around to putting this one in.  Put in a multi radar selection routine similar to what Ken at http://www.kenaiweather.com did.  Here is the link:http://cliftonvaweather.com/wxgr3hanis-multi.php (http://cliftonvaweather.com/wxgr3hanis-multi.php).

Bob
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on September 05, 2015, 02:21:12 PM
Thanks Jerry;

Finally got around to putting this one in.  Put in a multi radar selection routine similar to what Ken at http://www.kenaiweather.com did.  Here is the link:http://cliftonvaweather.com/wxgr3hanis-multi.php (http://cliftonvaweather.com/wxgr3hanis-multi.php).

Bob
One of many possible ways the script can be modified. :-)
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 05, 2015, 05:12:01 PM
Cleaned up a couple of things in the display.  This is very much Jerry's code, but if anyone wants to get an idea on adding the multi radar, here is an example. You need to download Jerry's code for the rest of it.
Title: Re: GRLevel3 Animation via HAniS
Post by: W3DRM on September 06, 2015, 11:22:04 PM
Thanks Jerry;

Finally got around to putting this one in.  Put in a multi radar selection routine similar to what Ken at http://www.kenaiweather.com (http://www.kenaiweather.com) did.  Here is the link:http://cliftonvaweather.com/wxgr3hanis-multi.php (http://cliftonvaweather.com/wxgr3hanis-multi.php).

Bob

Bob,

It looks like you have Pittsburgh, PA listed under Pennsylvania and West Virginia as well as several other radars that are listed under the wrong States at the above link...
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 07, 2015, 07:53:09 AM
Thanks Jerry;

Finally got around to putting this one in.  Put in a multi radar selection routine similar to what Ken at http://www.kenaiweather.com (http://www.kenaiweather.com) did.  Here is the link:http://cliftonvaweather.com/wxgr3hanis-multi.php (http://cliftonvaweather.com/wxgr3hanis-multi.php).

Bob

Bob,

It looks like you have Pittsburgh, PA listed under Pennsylvania and West Virginia as well as several other radars that are listed under the wrong States at the above link...

Intended, I was looking at it from the point of view of the viewer.  These radars cover particular areas and here on in the east often outside of the state they are located in.  For instance the Sterling VA radar covers Northern VA, DC and most of Maryland.  If I am not familiar with where the NOAA radar sites are but want to see my radar, I should be able to look up the state I am in and see what the possibilities are.  This is especially true in New England where NH, RI and CT don't have a radar site.  So the Pittsburg site covers PA but also the pan handle of WV.  The Mt Holly NJ site covers PA and NJ.  Wakefield VA covers VA and NC.  Often the Sterling VA site is left off of VA because it is listed as Baltimore and DC, even though it is in VA and covers northern VA.

Bob
Title: Re: GRLevel3 Animation via HAniS
Post by: jay_hoehn on September 07, 2015, 02:41:09 PM
Jerry,

Not sure where I have gone wrong.  I can't get the images to show up and run.  Help please.

Jay

http://jayswoodfurniture.com/wx/wxgr3hanis.php

Jerry,  You may disregard this.  It was a file location problem.

Thanks
Title: Re: GRLevel3 Animation via HAniS
Post by: tnwxman on September 08, 2015, 12:05:26 PM
Thanks to everyone for the great scripts. I am trying the multi script as Nashville has a terminal Doppler in addition to the NWS Doppler. Two things. The radar legend does not show at the bottom. Also at the top where it says GRLevel3 Radar in big letters the radar site doe not appear. I noticed it does on others. Can someone help me with these issues.

Thanks.

Bob

http://lebanontnwx.org/wxgr3hanis-multi.php (http://lebanontnwx.org/wxgr3hanis-multi.php)
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on September 08, 2015, 12:25:14 PM
Thanks to everyone for the great scripts. I am trying the multi script as Nashville has a terminal Doppler in addition to the NWS Doppler. Two things. The radar legend does not show at the bottom. Also at the top where it says GRLevel3 Radar in big letters the radar site doe not appear. I noticed it does on others. Can someone help me with these issues.

Thanks.

Bob

http://lebanontnwx.org/wxgr3hanis-multi.php (http://lebanontnwx.org/wxgr3hanis-multi.php)
You've got some lower level editing to do of 'inc-multi-gr3hanis.php'.  I'm not running it, but you need to modify this section
Code: [Select]
        <select style="background-color:<?php echo $btnColor?>;border-radius:7px;color:<?php echo $btnTextColor?>;" id="radarLoc">
   
    <optgroup label="Delaware">
<option value="kdox" <?php echo $radarLoc=="kdox"?'selected="selected"':''?>> Dover DE</option>
        <option value="klwx" <?php echo $radarLoc=="klwx"?'selected="selected"':''?>> Sterling VA</option>
    </optgroup>
    <optgroup label="District of Columbia">
<option value="klwx" <?php echo $radarLoc=="klwx"?'selected="selected"':''?>> Sterling VA</option>
<option value="kdox" <?php echo $radarLoc=="dox"?'selected="selected"':''?>> Dover DE</option>
    </optgroup>
    <optgroup label="Maryland">
<option value="klwx" <?php echo $radarLoc=="lwx"?'selected="selected"':''?>> Sterling VA</option>
<option value="kdox" <?php echo $radarLoc=="kdox"?'selected="selected"':''?>> Dover DE</option>
<option value="kdix" <?php echo $radarLoc=="kdix"?'selected="selected"':''?>> Mt Holly NJ</option>
<option value="kpbz" <?php echo $radarLoc=="kpbz"?'selected="selected"':''?>> Pittsburg PA</option>
    </optgroup>
    <optgroup label="New Jersey">
<option value="kdix" <?php echo $radarLoc=="kdix"?'selected="selected"':''?>> Mt Holly NJ</option>
        <option value="kdox" <?php echo $radarLoc=="kdox"?'selected="selected"':''?>> Dover DE</option>
    </optgroup>
    <optgroup label="North Carolina">
<option value="krax" <?php echo $radarLoc=="krax"?'selected="selected"':''?>> Rahleigh Durham NC</option>
<option value="kmhx" <?php echo $radarLoc=="kmhx"?'selected="selected"':''?>> Morehead City NC</option>
<option value="kltx" <?php echo $radarLoc=="kltx"?'selected="selected"':''?>> Wilmington NC</option>
<option value="kakq" <?php echo $radarLoc=="kakq"?'selected="selected"':''?>> Wakefield VA</option>
<option value="kfcx" <?php echo $radarLoc=="kfcx"?'selected="selected"':''?>> Blacksburg VA</option>
    </optgroup>
    <optgroup label="Pennsylvania">
<option value="kpbz" <?php echo $radarLoc=="kpbz"?'selected="selected"':''?>> Pittsburg PA</option>
<option value="kccx" <?php echo $radarLoc=="kccx"?'selected="selected"':''?>> State College PA</option>
<option value="kdix" <?php echo $radarLoc=="kdix"?'selected="selected"':''?>> Mt Holly NJ</option>
    </optgroup>
    <optgroup label="Virginia">
<option value="klwx" <?php echo $radarLoc=="klwx"?'selected="selected"':''?>> Sterling VA</option>
<option value="kakq" <?php echo $radarLoc=="kakq"?'selected="selected"':''?>> Wakefield VA</option>
<option value="kfcx" <?php echo $radarLoc=="kfcx"?'selected="selected"':''?>> Blacksburg VA</option>
<option value="krlx" <?php echo $radarLoc=="krlx"?'selected="selected"':''?>> Charleston WV</option>
    </optgroup>
    <optgroup label="West Virginia">
<option value="krlx" <?php echo $radarLoc=="krlx"?'selected="selected"':''?>> Charleston WV</option>
<option value="klwx" <?php echo $radarLoc=="klwx"?'selected="selected"':''?>> Sterling VA</option>
<option value="kfcx" <?php echo $radarLoc=="kfcx"?'selected="selected"':''?>> Blacksburg VA</option>
<option value="kpbz" <?php echo $radarLoc=="kpbz"?'selected="selected"':''?>> Pittsburg PA</option>
    </optgroup>
    </select>
to contain ONLY your GRLevel3 radars.  Of course each must be running a separate GRLevel3 installation, and it looks like you have this setup.  Next modify this section
Code: [Select]
<?php    if ($radarLoc == 'klwx') {
      
$radarLocText 'Sterling VA ';
    } elseif (
$radarLocText == 'kakq') {
      
$radarLocText 'Wakefield VA ';
    } elseif (
$radarLoc == 'kfcx') {
      
$radarLocText 'Blacksburg VA ';
    } elseif (
$radarLoc == 'krlx') {
      
$radarLocText 'Charleston WV ';
    } elseif (
$radarLoc == 'kccx') {
      
$radarLocText 'State College PA ';
    } elseif (
$radarLoc == 'kpbz') {
      
$radarLocText 'Pittsburg PA ';
    } elseif (
$radarLoc == 'kdix') {
      
$radarLocText 'Mt Holly NJ ';
    } elseif (
$radarLoc == 'krax') {
      
$radarLocText 'Raleigh Durham NC ';
    } elseif (
$radarLoc == 'kmhx') {
      
$radarLocText 'Morehead City NC ';
    } elseif (
$radarLoc == 'kltx') {
      
$radarLocText 'Willmington NC ';
    } elseif (
$radarLoc == 'kdox') {
      
$radarLocText 'Dover DE ';
    }
?>
to include ONLY YOUR '$radarLoc' and '$radarLocText' entries.

That won't quite do it.

Go to Bob's site, right click on the legend and select 'Save as...' to download it, and then place it where it is referenced by 'inc-multi-gr3hanis.php'.  Bob has placed it in his root folder:
Code: [Select]
  <img src="gr3legend2.png" border="1" width="800" alt="Radar Legend"/>

Finally, in 'wxgr3hanis-multi.php' change the '$imageWidth' to match yours.
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on September 08, 2015, 01:15:31 PM
Bob,

Just to be picky, your text link above your banner has a small spelling error - http://cliftionvaweather.com/. Needless to say, that can't be found.   :-)
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 08, 2015, 02:14:54 PM
Bob,

Just to be picky, your text link above your banner has a small spelling error - http://cliftionvaweather.com/. Needless to say, that can't be found.   :-)

One has to watch for creeping "i"s that appear when one tries editing with fat fingers.  Thanks for bringing to my attention, has been fixed #-o
Title: Re: GRLevel3 Animation via HAniS
Post by: jgillett on September 08, 2015, 02:44:13 PM
No problem, and fully understand the 'fat fingers' malady - it's alive and well here, too. Figured I'd picked on Jerry enough (for a while).   :roll:
Title: Re: GRLevel3 Animation via HAniS
Post by: tnwxman on September 14, 2015, 02:16:46 PM
Hi Jerry,

Finally with my hectic work schedule I was able to make the changes you suggested for the multi. Thank you. I am still having one small issue, I cannot get Hopkinsville, KY to appear for the radar sight when it describes what radar image viewed. It does it for all the rest but not Hopkinsville. What did I mess up?

Thanks for the help.

Let me know.

Bob
KK4QXH

http://lebanontnwx.org/wxgr3hanis-multi.php (http://lebanontnwx.org/wxgr3hanis-multi.php)
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 14, 2015, 02:27:26 PM
Hi Bob;

In inc-multi-gr3hanis.php check where you see a line that looks like this: if ($radarLoc == 'klwx') {
      $radarLocText = 'Sterling VA ';  I suspect that the radarLoc for Hopkinsville may have a typo.  is the radar khpx?  If that is the case than the line should look like this
($radarLoc == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';
  or this
} elseif ($radarLoc == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';

Bob
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 14, 2015, 02:56:05 PM
Actually it is a typo, just found it in mine.  The second choice in that table reads $radarLocText when it should read $radarLoc:  I suspect that you have the following:

} elseif ($radarLocText == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';

as a line.  The line should read:

} elseif ($radarLoc == 'khpx') {
      $radarLocText = 'Hopkinsville KY ';

So it wasn't you that messed up, it was me #-o. 
Bob
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on September 14, 2015, 04:24:29 PM
There's a problem with the division widths when this script was adapted to accommodate images larger than 660px in the narrow Saratoga template.  The 'main-copy' division needs to be enlarged to reflect the wider images.  This should work:
In 'wxgr3hanis-multi.php' use
Code: [Select]
<?php if (isset($_SESSION['CSSwidescreen'])&&!$standAlone) { ?>
<div id="main-copy" style="width:<?php echo ($_SESSION['CSSwidescreen']=='calc(100%-114)' : ($imageWidth<660?660:$imageWidth)) ?>px">
<?php } else { ?>
<div id="main-copy" style="width:100%">
<?php } ?>
instead of
Code: [Select]
<div id="main-copy" <?php echo $standAlone'style="width:100%"':''?> >
already present in 'wxgr3hanis-multi.php'.

This change should place the entire GRLevel3 radar and controls within 'main-copy'.  Of course it will extend beyond the boundary of the rest of the page, but it will still be contained by its own boundary.

This change applies to 'wxgr3hanis.php' as well if images wider than 660px are displayed.
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 14, 2015, 06:35:20 PM
Thanks Jerry
Title: Re: GRLevel3 Animation via HAniS
Post by: tnwxman on September 15, 2015, 07:43:43 PM
Bob,

I think the text is correct, See below. Let me know. Hopkinsville should show the name. It shows the radar image.
<?php    if ($radarLoc == 'kohx') {
      $radarLocText = 'NWS Nashville TN ';
    } elseif ($radarLoc == 'tbna') {
      $radarLocText = 'FAA Terminal Nashville TN ';
    } elseif ($radarLoc == 'khpk') {
      $radarLocText = 'Hopkinsville KY ';
    } elseif ($radarLoc == 'khtx') {
      $radarLocText = 'Huntsville AL ';
    } elseif ($radarLoc == 'knqa') {
      $radarLocText = 'Memphis TN ';
    } elseif ($radarLoc == 'kmrx') {
      $radarLocText = 'Knoxville TN ';
    } elseif ($radarLoc == 'kdix') {
      $radarLocText = 'Mt Holly NJ ';
    } elseif ($radarLoc == 'krax') {
      $radarLocText = 'Raleigh Durham NC ';
    } elseif ($radarLoc == 'kmhx') {
      $radarLocText = 'Morehead City NC ';
    } elseif ($radarLoc == 'kltx') {
      $radarLocText = 'Willmington NC ';
    } elseif ($radarLoc == 'kdox') {
      $radarLocText = 'Dover DE ';


Thanks. Bob

http://lebanontnwx.org/wxgr3hanis-multi.php (http://lebanontnwx.org/wxgr3hanis-multi.php)
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 16, 2015, 05:08:54 AM
Hi Bob;

I believe Ft Campbell KY aka Hopkinsville has a callsign of khpx, your radarLoc is calling for khpk  Change the k to an x and I think things should start to work.  :-)

Eye chart material.  So Dr do you see a k or an x ? ;)
Title: Re: GRLevel3 Animation via HAniS
Post by: satcop on September 16, 2015, 06:42:03 PM
As Jerry gwwilk found a fix for the narrow Saratoga template (thank you Jerry for your help on this), and I found some typos thanks to Bob tnwxman, please find attached an update for the multi GR3 hanis example.  If you haven't already, you still very much need to download the main code from Jerry's GR3 Hanis script to complete this.  An example of this script in action can be found here:http://cliftonvaweather.com/wxgr3hanis-multi.php (http://cliftonvaweather.com/wxgr3hanis-multi.php)

Bob
Title: Re: GRLevel3 Animation via HAniS
Post by: tnwxman on September 16, 2015, 07:16:18 PM
 :oops: Gee a little thing like an x and a k. Need to check the calendar for my next eye appointment  :shock:. I do not know how many times I looked at that and missed it.

Thanks Bob for catching that. :!:
Title: Re: GRLevel3 Animation via HAniS
Post by: cw3beck on October 30, 2015, 12:42:32 AM
Jerry,
     I have read thru every post in this subject and have not found where I have gone wrong.  Pretty sure that I have the path set up correctly in the wxgr3hanis.php but maybe I still have the image size settings off.  Can you take a look and possibly make some recommendations?  Thanks!

http://eaglesrising.homeserver.com:8085/wxgr3hanis.php

images are in the path \grlevel3

############################################################################
/************************* Settings *****************************/
$radar = 'br1'; // Default radar type is set here
$radarLoc = 'khtx'; // IMPORTAMT!!! Default radar location is set here
$useRadarLoc = true; // Does your site include the radar location in the file name? true or false
$imageDir = '/grlevel3'; // Location of GRLevel3 images on server - NOTE! - now requires leading slash!
$imageWidth = 650; // Width of radar images
$iframeWidth = $imageWidth; // Default IFrame Width -- should no longer need adjustment
$iframeHeight = 650; // Default IFrame Height -- adjust as needed
$autoRefresh = false; // Use Autorefresh? true or false
$autoRefreshTime = 4; // Number of minutes between autorefreshes.  IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!!
$autoRefreshDefaultOff = false; // Begin with Autorefresh Off? true or false
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'darkslategray'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
############################ New in Version 2 ##########################
$pauseSeconds = 2; // Pause on last image, in seconds
$animRate = 20; // Frame Rate of animation: 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with integer
$numbImages = 10; // Number of images to display - between 3 and the number of images you are uploading
/*********************** End Settings ***************************/

Thanks for your time!

John B
Title: Re: GRLevel3 Animation via HAniS
Post by: jay_hoehn on February 01, 2016, 11:21:28 AM
Jerry,

I'm having an issue with this script.  Everything works fine on load but when I change to any other radar product the status reports on kmux radar.  The images are of the correct radar, kemx, just the status is wrong,  Not sure how long it has been like this.  I only noticed because kmux is showing red now.

Thanks for looking,

Jay

http://jayswoodfurniture.com/wx/wxgr3hanis.php
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on February 01, 2016, 12:07:22 PM
Try re-downloading wxgr3hanis.php (http://www.gwwilkins.org/wxgr3hanis.php?sce=view), inc-gr3hanis.php (http://www.gwwilkins.org/inc-gr3hanis.php?sce=view) and wxgr3hanis-iframe (http://www.gwwilkins.org/wxgr3hanis-iframe.php?sce=view).  Your version is dated 20150815 and my version is dated 20150917.  You must of course copy your settings from the old to the updated 'wxgr3hanis.php' and optionally to the debugging defaults section in 'inc-gr3hanis.php'.

Also be sure you are using  the latest version of HAniS, attached below.
Title: Re: GRLevel3 Animation via HAniS
Post by: jay_hoehn on February 01, 2016, 12:33:47 PM
Jerry,

Still no change.  I can't find a reference to kmux anywhere in the scripts.

Jay
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on February 01, 2016, 01:36:23 PM
The radar site is contained in your 'radar-status.php', and you have Ken's latest version on your site.  I noticed that you used relative addressing in places, that is beginning with './', and I wonder if the script isn't picking up an older copy of 'radar-status.php' somewhere on your site.  The copy at jayswoodfurniture.com/wx/ (http://jayswoodfurniture.com/wx/radar-status.php) has the display of the status turned off unless it's inactive:
Code: [Select]
  $myRadar = 'KMUX';   // San Francisco
//
  $noMsgIfActive = true; // set to true to suppress message when radar is active

Try setting in 'inc-gr3hanis.php'
Code: [Select]
<?php include("radar-status.php"); ?>to
Code: [Select]
<?php include("./radar-status.php"); ?> or replace the copy that's being used with Ken's latest version already present on your site.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on June 01, 2016, 05:14:19 PM
This script was written to use GRLevel3 images saved as 'jpg' graphics because these files are smaller than the corresponding 'png' files and therefore save bandwidth, but a user just had a problem with that 'jpg' default.

Accordingly, there's a new Version 3 (20160601) that is up on my web site that incorporates an '$imageType' setting.  You may download the updated scripts, wxgr3hanis.php (http://www.gwwilkins.org/wxgr3hanis.php?sce=view), inc-gr3hanis.php (http://www.gwwilkins.org/inc-gr3hanis.php?sce=view), and wxgr3hanis-iframe.php (http://www.gwwilkins.org/wxgr3hanis-iframe.php?sce=view) or you may redownload the package via the attached V3 zip.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 03, 2016, 07:31:29 PM
Please see this discussion (http://www.wxforum.net/index.php?topic=26301.msg295790#msg295790) about a necessary revision to 'radar-status.php'!
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on August 15, 2016, 03:13:38 PM
Any other tricks to try to prevent the browser caching?

It always happens to me if I view my wxgr3hanis.php on my phone or tablet and sometimes still
using my desktop browser. I even had someone "complain" to me by email that a local weather site should have
the most recent weather radar instead of something from hours or a day ago. This issue has been driving me nuts.

I've used the getUniqueImageURL on my main page so the radar image and my webcam snapshots are up to date
but where can I insert that within the wxgr3hanis.php or inc-gr3hanis.php files?
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 15, 2016, 04:08:15 PM
Any other tricks to try to prevent the browser caching?

It always happens to me if I view my wxgr3hanis.php on my phone or tablet and sometimes still
using my desktop browser. I even had someone "complain" to me by email that a local weather site should have
the most recent weather radar instead of something from hours or a day ago. This issue has been driving me nuts.

I've used the getUniqueImageURL on my main page so the radar image and my webcam snapshots are up to date
but where can I insert that within the wxgr3hanis.php or inc-gr3hanis.php files?
Be sure you are using the latest version of scripts.  The latest main script (http://www.gwwilkins.org/wxgr3hanis.php?sce=view), includes script (http://gwwilkins.org/inc-gr3hanis.php?sce=view), and iframe script (http://www.gwwilkins.org/wxgr3hanis-iframe.php?sce=view) can be downloaded and saved using the links.  Also be sure to save your customizations to the main script.  The iframe script which displays the images incorporates the 'getUniqueImageURL' function by design, so it shouldn't display stale images.
Title: Re: GRLevel3 Animation via HAniS
Post by: CNYWeather on August 15, 2016, 04:41:27 PM
Thanks Jerry.

I wiped it all all out on my site and stated from scratch. I'll see how it goes. THANKS!


UPDATE:
Seems to be all ok now Jerry. everything is updated all the time. Guess a fresh install was what it needed.
Thanks for the hard work!
Title: Re: GRLevel3 Animation via HAniS
Post by: RickNY on August 30, 2017, 10:53:19 AM
Hi Jerry... How difficult would it be to add code in this to replace the radar images with the "Radar data not currently available" image, similar to what is done with your Conus Hanis script? Currently KOKX is down -- but my page is still serving up the images from yesterday.

Thanks,
Rick
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 30, 2017, 11:04:13 AM
Hi Jerry... How difficult would it be to add code in this to replace the radar images with the "Radar data not currently available" image, similar to what is done with your Conus Hanis script? Currently KOKX is down -- but my page is still serving up the images from yesterday.

Thanks,
Rick
The stale images could be caught by using a filetime check.  I'll have to think about how to do it, Rick. Not much time today.

Thanks for the suggestion!
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 30, 2017, 07:38:49 PM
My site's radar, KOAX, will be down until at least September 8.  The 'radar-status' on the GRLevel3 animation script (https://www.gwwilkins.org/wxgr3hanis.php) informs users that they're not seeing current images, and if they pay attention to the date/times of the images they'll see they aren't current as well.

On the other hand the US Ridge Radar HAniS Script (https://www.gwwilkins.org/wxusradars-hanis3.php) has an image that the NWS has put up.  The link isn't on the 'Upper Right', just 'Upper' on the page, however.

My current feeling is that Ken True's radar-status script does an adequate job.  I could be convinced otherwise, however.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 09, 2018, 05:50:49 AM
I've posted a slightly modified version, dated today, of this script, wxgr3hanis.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.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 11, 2018, 07:24:06 PM
In case your radar goes down, the GR3 program will keep uploading stale images to your web site until the 'Radar is Down' message appears in its stead.  Sometimes easily comparing the Zulu date and time with that embedded in the images might help prevent some confusion.  Or maybe not.  Anyway there's no way to grab the image timestamp and determine if they're stale, so viewing the current Zulu date and time is an alternative.

Of course, the Ken True's radar-status script will keep us apprised of the current radar status, usually within minutes of it going down, so maybe I'm tilting at windmills here.  Anyway, the current Zulu date and time have been added to the latest script (https://www.gwwilkins.org/gwwScripts.php).  The only script that needs to be updated is 'inc-gr3hanis.php', although the timestamps on the others have also been refreshed.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on July 11, 2018, 10:23:35 PM
 :oops:
The script displayed the date of your time zone rather than the GM date.  Corrected zip uploaded.
Title: Re: GRLevel3 Animation via HAniS
Post by: gwwilk on August 28, 2018, 09:10:32 AM
At Tom Abell's urging I introduced a slight change to the GRLevel3 HAniS script.  You may now select a four digit Zulu time, hhmm, that counts up silently to the next minute or a 6 digit UTC time, hh:mm:ss, that counts up visibly to the next minute (https://www.gwwilkins.org/wxgr3hanis.php).  The switch is '$useUTC'.  (As usual my site may load slowly when checking on the radar's status.)

Be sure to retain your customizations if you implement this change which is downloadable via my Scripts page (https://www.gwwilkins.org/gwwScripts.php)