WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Topic started by: NWROrg Team on September 13, 2018, 09:21:34 AM
-
NOAA WEATHER RADIO SARATOGA TEMPLATE and STAND ALONE...
NWROrg became SSL ... Your templates and stand alone aren't working correctly...
You are not be synchronizing with the main NWROrg server databases,...
You will ALSO not be loading on your website...
UNLESS YOU MAKE THE FOLLOWING CHANGES to your scripts,
KEN will be releasing an updated version soon.
Add the "S" to the link in the following lines as shown:
NWR-radios-data.php
Line 4 //Purpose: fetch and cache the https://noaaweatherradio.org/java/NWR-radio-data.js file
Line 37 $fileName = "https://noaaweatherradio.org/java/NWR-radios-data.js";
Line 86 $content = str_replace('https:\\/\\/noaaweatherradio.org\\/content\\/thumbnails\\/',$imagesDir,$content);
NWR-radios-inc.php
Line 55 "NatGeo"
Make the URL "https"
NatGeo' => array(
'name' => 'NatGeo',
'URL' =>'http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}',
Line 165
These audio streams are graciously provided by personal weather website owners and others though <a href="https://noaaweatherradio.org/" target="_blank">NOAAWEATHERRADIO.org</a>.</p>
Line 183
see <a href="https://noaaweatherradio.org/" target="_blank">noaaweatherradio.org</a> website "How To?" page for details to submit an audio stream.
-
Thanks for the support. Mine is working after the changes.
-
Thanks for the heads up. Hadn't noticed it wasn't working.
-
I've updated the distribution V2.01 at https://saratoga-weather.org/scripts-wxradio.php for https support to noaaweatherradio.org
Changes to NWR-radios-inc.php and NWR-radios-data.php only. Thanks to all who contributed to the patches!
-
Ken,
I downloaded and installed the updated scripts and have two issues, one iMac and and one google map.
1. On my iMac... the Auto Play for the Live Broadcast does not work. I have to click on "Live Broadcast" to have it play. Also, the Map that should appear below the "Live Broadcast" area and above the "Coverage Area Map" says "Loading Map" and never loads.
2. When I try to view the "NOAA Radio Map" I get a Google error message " This page can't be load Google Maps correctly. However, when I "click" OK the maps appears to displaying correctly. This occurs on all browsers.
Any assistance will be greatly appreciated.
Thanks,
Joe
-
For some unknown reason, the code on the page
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
is not loading from either source, so jQuery is not initialized and so the NWR-radios.js script fails with ReferenceError: $ is not defined NWR-radios.js:262:1
using Firefox as the browser.
Using Chrome, the page loads, but autoplay does not happen.
It may be caused by your webserver using HTTP but responding with a "Upgrade: h2" header to request the browser to use HTTP2 (but that requires https).
Re (2) -- if you see the Google map message, it means the wrong JavaScript (the old one) was cached in the browser -- clear the cache and reload.
If you have something in your cPanel that says 'Use HTTP2', Id suggest turning it off until your website is fully https capable.
-
Thank you. I'm looking into https now.
-
Is there away to tell if the certificate was installed? I should be https capable now.
-
Yes, it is basically HTTPS capable now.. however, you have links to images that are http:// and need to be https:// to keep the 'lock' icon on.
http://chart.apis.google.com/chart?chs=90x60&chma=0,0,0,0&chd=t:50.8,49.2&cht=p3&chp=1.58&chf=bg,s,65432100&chco=FFD700,000000
http://icons.wunderground.com/data/640x480/mw_rd_anim.gif
http://icons.wunderground.com/data/640x480/mw_vi_anim.gif
on your home page. You need to go through your site and change the http:// links for images (and any external scripts or CSS) to https:// to keep the entire page contents with a 'lock'.
-
Thank you. I will do that.
-
I think I have corrected all of them.
Thanks!
-
Ken,
Have downloaded and installed your modified scripts but the Google Map will not load. Any ideas? http://indiantrailweather.com/wxradio.php
Thank you
-
With the new script, there is no Google map.. it is a Leaflet/OpenStreetMap map now.
Testing with http://indiantrailweather.com/radios.php (the non-template page) shows you have installed the scripts correctly.
The issue with your wxradio.php template page is that it is not the wxradio.php included with the distribution, but a modified version and I think that is the issue.. some of the old Google-map stuff is still on that page, and a different version of JQuery seems to be loaded. I'd suggest you use the wxradio.php from the distribution, and debug that first.
-
Thanks Ken. Will load the original wxradio.php script and debug. Much appreciated!
Update: Got it Ken. Thank you! \:D/
-
Old thread, but a change of www.nws.noaa.gov to https only necessitates a change to the NWR-radios.js script
Download the change at https://saratoga-weather.org/NWR-radios.js or the full package at https://saratoga-weather.org/scripts-wxradio.php