Sorry it’s taken me a while longer than I expected to work out the changes needed … there hasn’t been a major change to this script since Version 1.09 - 06-Dec-2013 (when the current instance of their website came online). 3yrs2mos is not a bad run for a script
Version 1.10 has some major changes in it:
- all the WU URLs are now HTTPS so you can keep your green padlock if your site is SSL/HTTPS
- some maps are no longer being updated by WU so Air Quality, IR Satellite, Humidity, Snow Depth and Visibility links have been dropped from the ‘below the map’ links area.
- The Jet Stream map (no longer available) has been replaced with a 24hr Precip map
- many of the new maps are using a different map projection than the prior map, so two new variables have been added
$CityPos10
$CityColor10
to support placement on the new map projections. - all the WU map URLs now go to icons.wunderground.com instead of maps.wunderground.com
- the setup screen has been modified and enhanced to have a button to copy the $CityPosN code to the clipboard for easy pasting into the WU-radar-inc.php settings area.
- For Saratoga template users, I’ve added the ability to have ALL the script settings be placed in Settings.php (after you’ve done a full configuration). That way, in the future, you can easily just replace the WU-radar-inc.php script and not have to reconfigure it. Bonus!
I’ve added a panel after the other maps links area that displays (if a Saratoga template is detected) the following:
For existing users of the script, the easiest update is likely:
- rename a local copy of WU-radar-inc.php to WU-radar-inc-orig.php
- Download the updated script:
Standalone: Download from the script page
Saratoga template: use the update tool with a query of Base-USA, Plugin-*, 14-Feb-2017 - edit WU-radar-inc.orig.php and copy
// settings ----------------------------- */
$imagesDir = './ajax-images/'; // directory for ajax-images+radar buttons with trailing slash
$RDR = 'MUX'; // last 3 characters of NOAA Radar Site Name
$Lat = '37.27153397'; //North=positive, South=negative decimal degrees
$Long = '-122.02274323'; //East=positive, West=negative decimal degrees
$City = 'Saratoga'; // Name of city
$WUregion = 'sw'; // WeatherUnderground regional map group name
// 'sw'=SouthWest, 'nw'=NorthWest, 'mw'=Midwest
// 'sp'=South Central, 'ne'=North East, 'se'=South East
$WUname1 = 'City Level'; // tooltip label for mode=1
$WUname2 = 'South SF Bay'; // tooltip label for mode=2
$WUname3 = 'SF Bay Area'; // tooltip label for mode=3
$WUname4 = 'Southwest US'; // tooltip label for mode=4
$WUname5 = 'Entire US'; // tooltip label for mode=5
from old to new script.
Then copy your
// $CityPos1 - for City Level radar/animation
$CityPos1 = 'left: 389px; top: -254px;';
$CityColor1 = '#FFFFFF'; // color of legend display
// see instructions above to set $CityURL value
$CityURL = 'https://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?station=MUX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.125&noclutter=0&t=1199816619&lat=37.27153397&lon=-122.02274323&label=Saratoga%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=478¢ery=335&transx=78&transy=95&showlabels=1&severe=0&rainsnow=0&lightning=0';
// $CityPos2 - for Metro Level radar/animation
$CityPos2 = 'left: 394px; top: -260px;';
$CityColor2 = '#FFFFFF'; // color of legend display
// see instructions above to set $MetroURL value
$MetroURL = 'https://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?station=MUX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.272&noclutter=0&t=1199816502&lat=37.27153397&lon=-122.02274323&label=Saratoga%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=436¢ery=276&transx=36&transy=36&showlabels=1&severe=0&rainsnow=0&lightning=0';
// $CityPos3 - for unzoomed radar/animation
$CityPos3 = 'left: 386px; top: -262px;';
$CityColor3 = '#FFFFFF'; // color of legend display
// $CityPos4 - for US Advisory map
$CityPos4 = 'left: 35px; top: -324px;';
$CityColor4 = '#FFFFFF'; // color of legend display
// $CityPos5 = USA Radar/animation
$CityPos5 = 'left: 45px; top: -277px;';
$CityColor5 = '#FFFFFF'; // color of legend display
// $CityPos6 - for USA Radar Map
$CityPos6 = 'left: 73px; top: -220px;';
$CityColor6 = '#FFFFFF'; // color of legend display
// $CityPos7 - Regional maps (Fronts, Satellite, Wind, Jet Stream, Snow Depth, etc)
$CityPos7 = 'left: 51px; top: -345px;';
$CityColor7 = '#FFFFFF'; // color of legend display
// $CityPos8 - for USA Flu map
$CityPos8 = 'left: 34px; top: -318px;';
$CityColor8 = '#0000FF'; // color of legend display
// $CityPos9 - for Regional Advisories map
$CityPos9 = 'left: 49px; top: -326px;';
$CityColor9 = '#FFFFFF'; // color of legend display
from old to new script. Don’t overwrite the $CityPos10 and $CityColor10 lines!
-
save the new WU-radar-inc.php and upload to your site.
-
run WU-radar-testpage.php?show=loc on your site.
-
click on the $CityPos10 link and click the cross-hair cursor on your city’s location on the map.
-
Click on ‘Copy to Clipboard’, and paste over $CityPos10 line in WU-radar-inc.php, then save and upload the script… you’re done.
If you have a Saratoga template, then you can (after uploading that $CityPos10 change), reload in your browser the WU-radar-testpage.php?show=loc to see the Settings.php entries at the bottom of the page.
Click on the “Copy Settings.php entries to Clipboard” button, then you can paste the entries in your Settings.php to replace
// Radar settings
$SITE['noaaradar'] = 'MUX'; // LAST 3 characters of NOAA Radar Site ID
// e.g. Radar KMUX has $SITE['noaaradar'] = 'MUX';
$SITE['WUregion'] = 'sw'; // Wunderground regional maps
// 'sw'=SouthWest, 'nw'=NorthWest, 'mw'=Midwest
// 'sp'=South Central, 'ne'=North East, 'se'=South East
and then upload the changed Settings.php to your site.
Then you can replace the WU-radar-inc.php with uncustomized versions as they are released and still have your site settings honored.
Enjoy!
Best regards,
Ken