HWS-template (WD34) beta test July version

Have you entered your nearby airport details in easyweathersetup, and your CheckWX API?

Oops, I got down the metar code, but forgot I had a CheckAPI code. It’s good now. Thanks.

I can not check your settings but with the debug console one can check all data files => https://stillwaterweather.com/pws/w34_module_test.php

Your ./jsondata/metar34.txt is not refreshed (an age of 12 hrs 16 min 14 seconds) so you probably not set the api, as @bitsostring also indicated

===

Your data file is entered as “https://stillwaterweather.com/wx/clientraw.txt
That will result in multiple external file loads every minute.
Always try to use relative addressing for files on the same webserver.
You should change that to “…/wx/clientraw.txt”, that will use less overhead.

===
I see a new problem, thanks for that. #-o
The nws alerts do not nicely fit in the box.

Wim

@Bunty

Could you please test this version so I can make sure that the nws-box will fit now?
But always make a copy first of the current script first!

Wim


wrnWarningCURLY.php.zip (1.82 KB)

Wim,
The clock_c_small.php works. It automatically changes from am to pm.
Thanks,
Tom

Wim,

I installed the July Beta version, and my WU charts quit working, so I uninstalled the July beta, and reinstalled the April version and the charts began working again.

As I reported in the April thread my charts began working about 05/07/19 and have been working 24/7 since then.

SORRY Wim,

False Alarm, I got it working, on my local test server. I’m sure it will work now on my live server.

Wim,

I’m trying to get my Menu items set up on the July release of “w34_menu.php” file.

I mentioned before that I have some Radar links that will not open using the “w34_frames.php” file, so I just added my links to the “w34_menu.php” file.You can see on my live site (april version): https://www.loweprofile.com/pws/

But with the new “w34_menu.php” file I am having a hard time getting the links located correctly on the page. I have included the old code below (just one link), can you give me any advice where to enter my link code, so it looks like my April version?


?>
<li><!--info --> 
<a href="bio_popup.php" data-featherlight="iframe" title="Contact WEATHERSTATION Info"> <?php echo $info.' '.lang('Contact Info'); ?></a>
</li>



<li><!---Link 1---><div class="nav-text"><a target="_new" href="http://premiuma.accuweather.com/premium/radar.asp?LocationID=55331US&display=0&site=msp&level=metro&anim=1" title="MSP Metro Radar"> <?php echo $info;?> MSP Metro Radar</a></div></li>


<!---frames -->  
<?php
$scrpt          = 'w34_frames.php';
if (file_exists('w34_frames.php') && isset ($extralinks) && $extralinks == true) {
# 

WD34-questions-2019-04.pdf:

If you want to include extra pages in the menu, you can use a standard iFrame script. Just check the demo site where you find a few entries in the menu. The supporting script is w34_frames.php where you setup the links to the extra page(s) you want to use.

You should not modify the w34_menu.php file but use the script which defines the extra menu entries.

I can not test the accuweather example as one needs to login for that.
So my example uses your nws forecast link and the [weatherdisplay link ](http://weatherdisplay link) from your current menu
This is line 49 in w34_frames.php (pws07 version)

#  E X A M P L E S change them as you like  
$frame                  = 'nwsforecast';
$frm_ttls[$frame]       = 'NWS forecast';  // name in menu
$frm_src[$frame]        = 'https://forecast.weather.gov/MapClick.php?lon=-93.55452001037594&lat=45.02110448314883#.XQCe29MzayF';
$frm_hgth[$frame]       = 1500;         //height
#
$frame                  = 'Weatherdisplay';
$frm_ttls[$frame]       = 'Weatherdisplay';  // name in menu
$frm_src[$frame]        = 'https://www.loweprofile.com/wx/';
$frm_hgth[$frame]       = 1500;         //height
#

The screenshot below shows the NWS page when loaded from the menu

Wim


w34_frames.php.zip (1.74 KB)

Thanks Wim,

I’m guessing that Accuweather has some code employed that inhibits embedding of their radar pages. Unfortunately they have the best radar images and we have very active weather here in Minnesota with nasty storms in the summer. Their Metro radar shows highly detailed images, not available anywhere else.

Even when I am logged in to Accuweather their pages will not load in the frame. I’ll do some further research and look at the errors that come up in Chrome development mode.

Wim,

Here is the error I get when I try to load Accuweather with a frame:

Mixed Content: The page at ‘https://www.loweprofile.com/pws/index.php?frame=radar’ was loaded over HTTPS, but requested an insecure resource ‘http://premiuma.accuweather.com/premium/RadarPro.asp?LocationID=24059_PC’. This request has been blocked; the content must be served over HTTPS.

I can load the page if tell chrome to load the unsafe script.

Wim,

I have July version running live again. On mobile the ribbon at the top is missing, so no menu’s etc. I have attached a screen shot.

Also the pop up charts do not seem responsive. They load at a size too big for the screen, and are not sizable, although they can be moved.

Exhibits same behavior in Chrome development mode for phones, but works on Tablets.

Chrome browser
Dolphin browser
Samsung S8

I see now, that this was mentioned before, but you could not replicate it. Not sure what is going on. Maybe try the Chrome Development mode on your desktop, that shows it clearly.

*********JUST FIGURED THIS OUT. When phone is rotated to Landscape the ribbon shows up!!. Must just be a size issue. You can just drag a browser window smaller and at a certain point the ribbon disappears.

***Here is the error on the pop ups:

canvasJs.js:24 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
J @ canvasJs.js:24
w @ canvasJs.js:34
Chart @ canvasJs.js:521
(anonymous) @ w34_graph_xx.php?period=month&type=temp&script=temp_c_block.php:122
canvasJs.js:24 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
J @ canvasJs.js:24
w @ canvasJs.js:35
Chart @ canvasJs.js:521
(anonymous) @ w34_graph_xx.php?period=month&type=temp&script=temp_c_block.php:122

That is the common error with https / http mixing.
Did you try to change the accuweather link to https ?
$frm_src[$frame] = ‘https://premiuma.accuweather.com/premium/RadarPro.asp?LocationID=24059_PC’;

Wim

Yeah, it does not load manually in a browser that way, either.

It’s very likely that Accuweather employs one of the frame blocking techniques.

It’s the mixed content blocker in Chrome.

To allow mixed content in Google Chrome:

Click the shield icon in the far right of the address bar.
In the pop-up window, click Load anyway or Load unsafe script (depending on your Chrome version).
Note: The steps to “load anyway” must be completed for each page where the icon or message appears.

To set your Chrome browser to ALWAYS allow mixed content:

Caution: If using this option, Chrome will no longer check for unsecured content of every webpage (not just the Pearson product you are using).

In an open Chrome browser, press Ctrl+Shift+Q on your keyboard to force close Chrome. Chrome must be fully closed before the next steps.
Right-click the Google Chrome desktop icon (or Start Menu link).
Select Properties.
At the end of the existing information in the Target field, add: " --allow-running-insecure-content" (There is a space before the first dash.)
Click OK.
Open Chrome and try to launch the content that was blocked earlier. It should work now.

I have no idea.
your site graphs do not resize https://www.loweprofile.com/pws/

other sites:
http://wd34.weather-template.com/pws07/ correct resize
https://hwsdemo.000webhostapp.com/pws07/index.php correct resize
https://sluispark.be/pwsTEST/ correct resize

Maybe an incomplete install?

As it is busy with family matters I need to postpone checking till tomorrow.

Those grpahs resize and adapt dynamically when you rezie the window using Chrome and FF
Wim


Thanks Wim,

I’ll do a reinstall of fresh files.

Interesting, thanks for that insight :slight_smile:

Seems to work Ok now, 19:00 UTC

Wim

That was a very weird problem. I installed fresh files, but still had problems with pop ups on Chrome mobile, despite emptying cache and doing hard reloads.

I eventually uninstalled Chrome updates on Android and then re-installed latest updates from Play Store. After that the chart pop-ups behaved normally.

Just thought I should post that FYI in case anyone else has same issue.