Author Topic: Support of the "Leuven" Forecast scripts  (Read 17632 times)

0 Members and 1 Guest are viewing this topic.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #125 on: May 01, 2023, 03:02:13 AM »
Could you please substitute English for the Dutch words as shown in the screenshot.

 [ You are not allowed to view attachments ]

Thanks
Keith

@ALL:  I am not clairvoyant. Nor am I paid for in any way to give support. Nor did you have pay anything to use the scripts.
If you want "free products" and "free support"  at least be so decent to  do the work which one can do themselves.


@griffo42
PLEASE always include the link to the page with the "problem" you want to be solved.
Not a general website link in your avatar. ->  https://www.kstwx.net/index.php 
Not a page from the menu where the scripts are hidden in an iFrame.  -> https://www.kstwx.net/wxnorwayfcst.php
But the "page" or link with the information -> https://www.kstwx.net/wsfct4/wsFctMetnoPage4.php

Your request: "Could you please substitute English for the Dutch words"
Although I wrote and maintain the scripts you use,  they are running on your website.
Therefor you have to do the normal maintenance as I have no way to remotely change your scripts

The language translation-files  to "translate my-english" to your "local English" are kept in the folder . . /wsfct4/lang/
The English "translations" are in https://www.kstwx.net/wsfct4/lang/fctlanguage-en.txt
Line 105 has the translation with a Dutch word in it.
Code: [Select]
langlookup|Windspeed|Windsnelheid|Change that line to whatever text you want.
Code: [Select]
langlookup|Windspeed|Windspeed|When changing wsfct4/  files, use a decent script/code editor. Do not use MS-word or similar document editor.

Thank you for using the Leuven Forecast scripts.
Wim van der Kuil
Leuven script supporters

Offline griffo42

  • Contributor
  • ***
  • Posts: 101
    • Carina Weather
Re: Support of the "Leuven" Forecast scripts
« Reply #126 on: May 01, 2023, 04:11:12 AM »
Thank you for your prompt reply to my request for help. Fixed.

Keith
https://www.kstwx.net/index.php
Davis Vantage Pro2 Model #6152AU
Cumulus latest version
Saratoga Weather World template Cumulus plugin
Carina Weather, Brisbane.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #127 on: May 03, 2023, 05:51:25 AM »
The demo site https://pwswd.be/wsfct4/  and the full download are refreshed on 2023-05-03

For now the wxsim scripts with its multiple tabs does not work correctly with HighCharts  11.0.0 , I changed that script to use an old version.

Change line 846-847 to
Code: [Select]
$use_old_version='10.3.3/';
$ws_mgraph_html .='<script src="https://code.highcharts.com/'.$use_old_version.'highcharts.js"></script>
Or download attached zip of the 4 scripts with the highchart changes

Succes,
Wim
Leuven script supporters
« Last Edit: May 03, 2023, 05:53:53 AM by wvdkuil »

Offline kyomar

  • Member
  • *
  • Posts: 13
Re: Support of the "Leuven" Forecast scripts
« Reply #128 on: May 08, 2023, 08:26:43 PM »
Wim, many thanks for the updated scripts - greatly appreciated. It's working great.

Offline Dador

  • Senior Member
  • **
  • Posts: 62
    • Jejkowice
Re: Support of the "Leuven" Forecast scripts
« Reply #129 on: June 22, 2023, 02:27:18 AM »
Hi,

I'm using the latest script pack that Wim has provided. Until a few days ago everything was working fine. Now the script returns me this information. Note that I did not change anything in the code.

Code: [Select]
No data was retrieved for https://api.met.no/weatherapi/locationforecast/2.0/classic/?lat=50.0636&lon=18.2821

no forecast data can be retrieved, check the html for errors

Maybe it's my hosting fault? Recently I had the impression that their network drive crashed and they were making a backup. However, all other scripts (from other authors) work. :???:

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #130 on: June 22, 2023, 03:52:36 AM »
Hi,

I'm using the latest script pack that Wim has provided. Until a few days ago everything was working fine. Now the script returns me this information. Note that I did not change anything in the code.

Code: [Select]
No data was retrieved for https://api.met.no/weatherapi/locationforecast/2.0/classic/?lat=50.0636&lon=18.2821

no forecast data can be retrieved, check the html for errors

Maybe it's my hosting fault? Recently I had the impression that their network drive crashed and they were making a backup. However, all other scripts (from other authors) work. :???:
There are two advices in the error message
1.  No data was retrieved  for "link"
When you copy the link to your browser, the correct xml data is returned.
 
2. check the html for errors
What is the link to your website and to the forecast page so I can check the generated html?
The link to your website (from the globe in your avatar) is https://pogodarybnik.pl/  but that one does not work.  ERR_CONNECTION_TIMED_OUT


Also there are more and more providers blocking certain IP-ranges where too much bots are operating from.
I attach a small test-program you should unzip and put inside the root of your website.
it will test to load the met.no xml in three ways.
  • In an iFrame, which normally should word as that is executed in your browser.
  • In the script using CURL, that only works if your provider is not blocking outside access and your server-IP is not blocked by the met.no server.
    = => sometimes the CURL settings of your webserver are changed therefor the complete CURL messages are displayed
  • Using file-get-contents, which is often switched off by your provider.
    = = . this access-type it is not used in the leuven scripts, but we can use it if this works in your environment and the CURL access is bloccked

Not much I can further do without access to your site.

Succes,
Wim



Offline Dador

  • Senior Member
  • **
  • Posts: 62
    • Jejkowice
Re: Support of the "Leuven" Forecast scripts
« Reply #131 on: June 22, 2023, 04:43:07 AM »
Wim,

thank you for your express response. [tup]

1.  No data was retrieved  for "link"
When you copy the link to your browser, the correct xml data is returned.

I saw this when I accessed the page from this link. The forecast was generated on met.no.

2. check the html for errors
What is the link to your website and to the forecast page so I can check the generated html?
The link to your website (from the globe in your avatar) is https://pogodarybnik.pl/  but that one does not work.  ERR_CONNECTION_TIMED_OUT

It is interesting. I can easily access my website, both from home via WiFi and from the mobile network.
My site with forecast - https://pogodarybnik.pl/metno.htm

You may be right that it was some kind of blockage, but on my hosting side. Interestingly, the script just started working. What, how, why? I don't know, it just works.  :shock:

If it breaks again, I'll check according to your instructions and script.

Thank for your help :grin:

Offline ThorntonWeather

  • Member
  • *
  • Posts: 39
    • ThorntonWeather.com
Re: Support of the "Leuven" Forecast scripts
« Reply #132 on: December 02, 2023, 08:31:28 AM »
I just installed the forecast script and have it up and running. However, I am running into a weird width issue where it appears one the forecast scripts is overriding my page width settings. Using the Saratoga templates, all my pages are set to 1250px. However, the forecast script seems to be setting the page width to 1000px and thus the forecast doesn't fit within the main-copy. I have tried modifying every width setting in the forecast scripts I could find but can't seem to find where it is setting that 1000px page width from. If you visit the link below, then compare the page width to any other page on my site, you can see the difference.

Link to forecast page:  https://thorntonweather.com/wx_lvn_noaaD.php

Any help would be greatly appreciated.

   Tony

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #133 on: December 02, 2023, 09:09:26 AM »
I just installed the forecast script and have it up and running. However, I am running into a weird width issue where it appears one the forecast scripts is overriding my page width settings. Using the Saratoga templates, all my pages are set to 1250px. However, the forecast script seems to be setting the page width to 1000px and thus the forecast doesn't fit within the main-copy. I have tried modifying every width setting in the forecast scripts I could find but can't seem to find where it is setting that 1000px page width from. If you visit the link below, then compare the page width to any other page on my site, you can see the difference.

Link to forecast page:  https://thorntonweather.com/wx_lvn_noaaD.php

Any help would be greatly appreciated.

   Tony

Hi Tony,

Nice problem, happend also in the past.
This is caused as the scripts calculate the width and inserts the css dynamically.

To test myself, I have to (re-)install  Saratoga web-site .
https://www.weerstation-herent.be/saratoga/wx_lvn_noaaD.php
That current demo is incomplete although it works correct when widening the needed space.

But sorry, that will be some day next week.

A faster solution, run the scripts "stand-alone in an iframe.

Regards,
Wim


Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #134 on: December 02, 2023, 09:34:44 AM »
Hi Tony,

Please modify line 28 in   wx_lvn_noaaD.php from
Code: [Select]
$wsPageSize     = 1000; // in pixelsto
Code: [Select]
$wsPageSize     = 1250; // in pixels
Also remove the line 45
Code: [Select]
$mtb_styles['#page']    = 'width: 1250px';
Probably it will help, but when changing parts of the "generated" html, the cached html is still there.
Therefor after making changes, run https://thorntonweather.com/wx_lvn_noaaD.php?force=noaaD
That invalidates all cached html.

I set the width at the demosite -> Saratoga -> NOAA-details at 1250 px for the page.
All others have the demo widt of 1000px.
It should work at your site only.

Wim
« Last Edit: December 02, 2023, 10:22:11 AM by wvdkuil »

Offline ThorntonWeather

  • Member
  • *
  • Posts: 39
    • ThorntonWeather.com
Re: Support of the "Leuven" Forecast scripts
« Reply #135 on: December 02, 2023, 03:56:23 PM »
Win,

That did it! Thank you so much for the help. I was losing my mind trying to figure out where it was coming from.

Thank you again!

   Tony

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Support of the "Leuven" Forecast scripts
« Reply #136 on: January 18, 2024, 03:38:04 PM »
My apologies in advance if I ask obvious questions since I have little knowledge to which is added the language problem (I am using Google Translate)

I just launched the scripts: https://www.meteosanjuan.com/wx_lvn_wxsimD.php

First of all, many thanks to the author for making it easy for those of us who have little programming knowledge with the scripts adapted for the Saratoga templates. Just link in the menu and it's working. I have read something about making a donation, which seems very fair to me since this hobby that many of us share makes me happy.

I want to make some configurations, but I don't know in which script I should do them, because there are two that seem the same to me, they are metric _us and ca_settings.php

I have observed that any change in the configuration script does not have an immediate effect on the web, I have to wait for a new forecast of my wxsim to be made. Would there be a way to see them immediately?

As for the translation into my language, it works perfectly. I understand that it works since the root folder contains plaintext-parser-lang-es.txt, although it is clearly indicated in the manual that a new translation file must be generated. I'm confused about this

The font size is correct from the PC, but it seems too big from the mobile.

And finally, could you start by default, below the meteogram, the icons instead of forecast? I don't know if I understand myself.
That is, this was the default boot, as in the image I attached

Thank you so much

Offline cbnidk

  • Member
  • *
  • Posts: 5
    • Vejret i Esrum
Re: Support of the "Leuven" Forecast scripts
« Reply #137 on: January 22, 2024, 01:07:25 PM »
Hi

My page is messing the weekdays

https://vejr.bloknet.dk/vejr_forcast/wsFctMetnoSmall4.php
I can't find out why
I have a page on another server and here is the weekday, can it be something with php ver.?

CB

Offline Weerstation

  • Member
  • *
  • Posts: 44
    • Westland De Poel
Re: Support of the "Leuven" Forecast scripts
« Reply #138 on: January 27, 2024, 03:34:18 AM »
I am having the same problem.
Did you find a solution yet?

Offline cbnidk

  • Member
  • *
  • Posts: 5
    • Vejret i Esrum
Re: Support of the "Leuven" Forecast scripts
« Reply #139 on: January 27, 2024, 03:53:50 AM »
I am having the same problem.
Did you find a solution yet?

Hi

No I have not found the solution and my page on another server have the problem to now
so it is not php ver. I think

The demo site have the problem to
https://pwswd.be/wsfct4/wsFctMetnoPage4.php


cb
« Last Edit: January 27, 2024, 03:59:21 AM by cbnidk »

Offline Weerstation

  • Member
  • *
  • Posts: 44
    • Westland De Poel
Re: Support of the "Leuven" Forecast scripts
« Reply #140 on: January 27, 2024, 04:12:33 AM »
My pwsDashboard template is missing the weekdays also.
Met.No has probably changed something on their graphs.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #141 on: January 27, 2024, 04:45:53 AM »
Hi
My page is messing the weekdays
https://vejr.bloknet.dk/vejr_forcast/wsFctMetnoSmall4.php
I can't find out why
I have a page on another server and here is the weekday, can it be something with php ver.?
CB
I am having the same problem.
Did you find a solution yet?
Thanks for posting about this.

I am working on it since early this morning, but no "correct' solution yet.

It seems there are two problems occurring / noticed today.
A minor problem with the met.no data. But it was not noticed before as long as debug mode remains off.

The missing bottom part of the graphs with the week-days occurred with the latest high-charts version
-> Highcharts JS v11.3.0 (2024-01-10)
It is a .0 version but also two weeks old.
If there is a problem in the .js code, someone would have found it.
Moving back to an older version, removes this problem until I can find what to change in my high-charts code.

Line 874 in script wsIncMetnoHtml4.php version 4.12 2023-05-01 reads now
Code: [Select]
$ws_mgraph_html .='<script src="https://code.highcharts.com/highcharts.js"></script>change it to load a previous version
Code: [Select]
$ws_mgraph_html .='<script src="https://code.highcharts.com/11.2/highcharts.js"></script>
Succes,
Wim
« Last Edit: January 27, 2024, 04:48:22 AM by wvdkuil »

Offline cbnidk

  • Member
  • *
  • Posts: 5
    • Vejret i Esrum
Re: Support of the "Leuven" Forecast scripts
« Reply #142 on: January 27, 2024, 05:06:51 AM »
Hi
My page is messing the weekdays
https://vejr.bloknet.dk/vejr_forcast/wsFctMetnoSmall4.php
I can't find out why
I have a page on another server and here is the weekday, can it be something with php ver.?
CB
I am having the same problem.
Did you find a solution yet?
Thanks for posting about this.

I am working on it since early this morning, but no "correct' solution yet.

It seems there are two problems occurring / noticed today.
A minor problem with the met.no data. But it was not noticed before as long as debug mode remains off.

The missing bottom part of the graphs with the week-days occurred with the latest high-charts version
-> Highcharts JS v11.3.0 (2024-01-10)
It is a .0 version but also two weeks old.
If there is a problem in the .js code, someone would have found it.
Moving back to an older version, removes this problem until I can find what to change in my high-charts code.

Line 874 in script wsIncMetnoHtml4.php version 4.12 2023-05-01 reads now
Code: [Select]
$ws_mgraph_html .='<script src="https://code.highcharts.com/highcharts.js"></script>change it to load a previous version
Code: [Select]
$ws_mgraph_html .='<script src="https://code.highcharts.com/11.2/highcharts.js"></script>
Succes,
Wim

Hi

Yes, if 11.2 ver. is used than it working

Thank you for the fix

CB

Offline Weerstation

  • Member
  • *
  • Posts: 44
    • Westland De Poel
Re: Support of the "Leuven" Forecast scripts
« Reply #143 on: January 27, 2024, 06:50:09 AM »
 [tup]
Thanks, that did the job.
The only thing is that the weekdays are not properly aligned but that has always be the case on my website.

Changed this also in fct_yrno_popup.php on pwsDashboard.
Working also.

Offline Vasco

  • Forecaster
  • *****
  • Posts: 342
    • PWS
Re: Support of the "Leuven" Forecast scripts
« Reply #144 on: January 27, 2024, 09:16:52 AM »
Changed this also in fct_yrno_popup.php on pwsDashboard.

I'm still using 10.3.3 on my (very old) pwsWD forecast popup graphs  :)
« Last Edit: January 27, 2024, 09:18:29 AM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #145 on: January 27, 2024, 09:45:38 AM »
New version 4.13 of the Leuven-Forecast scripts online.
Solved:
  • MetNo, HWA and NOOA forecasts  compatibility issue HighCharts 11.3.0
  • WXSIM multiple tabs compatibility issue HighCharts 11.0.0
Attached zip of the 4 changed scripts only.

Wim

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Support of the "Leuven" Forecast scripts
« Reply #146 on: February 26, 2024, 05:34:39 AM »
I have been investigating but I have not found, or rather I have not known, that the default option when loading the script is the icons option. By default it starts me in forecast.

Thank you


Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #147 on: February 26, 2024, 06:08:24 AM »
I have been investigating but I have not found, or rather I have not known, that the default option when loading the script is the icons option. By default it starts me in forecast.

Thank you
The "default option" is set by adding class tabbertabdefault to the "block / tab" you want to show on top of the other tabs.

Remove that word tabbertabdefault from line 339 in your adapted version of /wsfct4/wsFctWxsimDPage.php

Add that word to your line 328 so that it reads
Code: [Select]
    {   echo '<div class="tabbertab  tabbertabdefault" title="'.ws_translate ($wxsim_icons_tab_text).'">'.PHP_EOL;
Also:
Line 253 has a php warning
Quote
Warning: Use of undefined constant Sevilla - assumed 'Sevilla' (this will throw an Error in a future version of PHP) in /home/meteosan/www/wsfct4/wsFctWxsimDPage.php on line 253
Caused by a typing error. Change that line from
Code: [Select]
<meta name = " Keywords" content="weather, forecast '.' '.Sevilla.'" />to
Code: [Select]
<meta name = " Keywords" content="weather, forecast, Sevilla" />
Succes,
Wim
« Last Edit: February 26, 2024, 06:10:20 AM by wvdkuil »

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Support of the "Leuven" Forecast scripts
« Reply #148 on: February 26, 2024, 02:14:41 PM »
Perfect, following your instructions it is already modified and working. Thanks for everything.

Offline griffo42

  • Contributor
  • ***
  • Posts: 101
    • Carina Weather
Re: Support of the "Leuven" Forecast scripts
« Reply #149 on: March 01, 2024, 01:20:06 AM »
I have your Norway forecast script running in an iframe at https://www.kstwx.net/wxnorwayfcst.php. The iframe is referencing https://kstwx.net/wsfct4/wsFctMetnoPage4.php.

The error file - https://kstwx.net/wsfct4/error_log lists errors in https://kstwx.net/wsIncMetnoHtml4.php: a zip file of the errors is attached.  The errors seem to occur only intermittently.   [ You are not allowed to view attachments ]

Could you please tell me if there is any fix that I can apply to stop these errors occurring and hence have no errors reported when the Norway forecast is accessed my website?

Thanks

Keith, Brisbane Australia
https://www.kstwx.net/index.php


https://www.kstwx.net/index.php
Davis Vantage Pro2 Model #6152AU
Cumulus latest version
Saratoga Weather World template Cumulus plugin
Carina Weather, Brisbane.

 

anything