WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: wvdkuil on March 28, 2019, 04:27:01 PM

Title: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 28, 2019, 04:27:01 PM
All the "Leuven" weather-forecast scripts are in 1 folder and in 1 download. Currently the following forecasts are available :
Download and demo of all forecasts: https://pwswd.be/wsfct4/
Demo inside Saratoga template: https://www.weerstation-herent.be/saratoga/wx_lvn_wxsimPP.php
Readme: https://pwswd.be/wsfct4/readme.html
Known issues: link will be added when needed

Remarks:
Positive: "A lot of settings" To adjust what contents you want, what colours a.s.o.
Negative: "A lot of settings" The output is cached, so you have to learn to clear the cache when testing a change in your settings.
 
These scripts can be used Stand-Alone and in the Saratoga-template.
They could be used in the Leuven-Template also, but they are not supported there! Use at your own risk.

These are very extensive and complex scripts, do not change the scripts themselves.
Change only the settings and the startpages. All as described in the readme.


Support:
When you post questions about the scripts
Checking those things also helps to reduce the time for answering your questions.

Wim
Leuven script supporters (https://support.leuven-template.eu/userlistScripts.php)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: saratogaWX on March 28, 2019, 05:12:22 PM
 =D>  =D> Outstanding, Wim -- thanks for sharing these!
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Alter49 on April 02, 2019, 06:45:04 AM
Danke Wim Super [tup]
Title: Re: Support of the "Leuven" Forecast scripts
Post by: philipgm on April 23, 2019, 09:26:11 PM
Wow! What a great script. Excellent. [tup]
Title: Re: Support of the "Leuven" Forecast scripts
Post by: meteosa on May 17, 2019, 02:12:12 PM
Hello,
I installed your Forecast scripts, but how do I set the Italian language? I put the file in the "lang" folder, set in the php file: lang: "it" but it doesn't translate it for me, why?
Thank you
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on May 17, 2019, 02:49:31 PM
Hello,
I installed your Forecast scripts, but how do I set the Italian language? I put the file in the "lang" folder, set in the php file: lang: "it" but it doesn't translate it for me, why?
Thank you

@ALL  PLEASE ALWAYS INCLUDE THE URL TO YOUR WEBSITE / SCRIPT
As from now, no answers if you do not include the links.

@metosa
I will use the Italian language as example, but it works the same for most western languages
To install 1 extra language, follow these steps
That array to change is below the warnings about knowing what you are doing. Be careful.
Code: [Select]
# ----------------------------------------------
#                              language settings
#-----------------------------------------------
$ws_langs_supported = array ('en', 'nl', 'fr', 'de');
Change to
Code: [Select]
# ----------------------------------------------
#                              language settings
#-----------------------------------------------
$ws_langs_supported = array ('en', 'nl', 'fr', 'de','it');

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ugo71 on June 15, 2019, 10:15:48 AM
Hi, Wim excellent script thanks.  [tup]
It could be an idea to make a yr.no script (which in my opinion is one of the most reliable) for mobile devices by putting only 3 forecasts on one line then on the line under other 3 forecasts.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on June 15, 2019, 10:38:13 AM
Hi, Wim excellent script thanks.  [tup]
It could be an idea to make a yr.no script (which in my opinion is one of the most reliable) for mobile devices by putting only 3 forecasts on one line then on the line under other 3 forecasts.
Thanks for the compliment.
I use the scripts myself also for the mobile devices.
The forecast is in a separate page with a normal forecast so users can scroll / move through all info.

Maybe next year i will have time to make a new 'responsive' version also.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: weatherola on January 27, 2020, 12:45:22 PM
Wonderful work on this Wim. And, thanks for your support on the Weather34 templates, too.

The one question I have is related to the DarkSky forecasts when used within Ken's Saratoga templates. I've followed your setup instructions and it seems to be working fine, with the exception of template width issue (looking forward to responsive templates for everything) but under the forecast header appears..."Forecast data created at Monday Jan 27 2020 - 9:26am For Station Xetc, etc." I get my Lat/Long location added  on. I really don't want the GPS location of my station shown. Is there something wrong with the way I've set this up, or is there a simple way to turn this off or comment it out?

Thanks

Tim

Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 27, 2020, 01:14:20 PM
Wonderful work on this Wim. And, thanks for your support on the Weather34 templates, too.

The one question I have is related to the DarkSky forecasts when used within Ken's Saratoga templates. I've followed your setup instructions and it seems to be working fine, with the exception of template width issue (looking forward to responsive templates for everything) but under the forecast header appears..."Forecast data created at Monday Jan 27 2020 - 9:26am For Station Xetc, etc." I get my Lat/Long location added  on. I really don't want the GPS location of my station shown. Is there something wrong with the way I've set this up, or is there a simple way to turn this off or comment it out?

Thanks

Tim
i am on vacation with insufficient internet. There is a setting to switch off  testing/debug and that will also remove the lat-Lon numerals.

I will be back Feb 1 and will check this out

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: weatherola on January 29, 2020, 01:24:59 PM
Thanks Wim. I might be looking in the wrong place. Haven't managed to turn off the testing switch, so still seeing lat/lon.

Tim

weatherola.com
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 01, 2020, 12:03:31 PM
Thanks Wim. I might be looking in the wrong place. Haven't managed to turn off the testing switch, so still seeing lat/lon.
Tim
weatherola.com
The settings files,  such  as _metric_settings.php contain the setting to switch all errors (and other debug code) off when you are finished testing.
Set $ws_errors to false and the string such as "Forecast data created at Saturday 01 February 2020 - 17:55 For: 51.904,5.69" will not be shown.
If you later on doubt if there is "a problem / error" simply add ?debug or &debug to your URL and the date/time/lat/lon will be shown with  all other "messages"

Succes, Wim
Code: [Select]
#-----------------------------------------------
#            for ALL websites using metric units

#-----------------------------------------------
# # #  Here you have to make the changes   # # #
# # #       for stand-alone use            # # #
#-----------------------------------------------
#                       error messages on or off
#    always set to false for production versions
#
$ws_errors      = false; # false when ready testing     
#-----------------------------------------------
Title: Re: Support of the "Leuven" Forecast scripts
Post by: weatherola on February 01, 2020, 02:13:16 PM
Thanks Wim for clarifying the location for the switch. Unfortunately, setting the switch to "false" still leaves me with the string showing. I am using the _us settings and changed it there as you suggested. I would think that would have removed it, but alas, no. All is the same. If you'd like to have a look, feel free to visit weatherola.com. Sorry to be such a pest.

Tim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: weatherola on February 02, 2020, 12:05:07 AM
Wim,

The switch seems to be working, now. Though I tried it on a couple of computers earlier, the debug code is no longer visible and switched off. Caching, I assume. All better now.

Thanks again for your help, Wim.

Title: Re: Support of the "Leuven" Forecast scripts
Post by: ctccbc on February 13, 2020, 11:38:56 AM
I posted this question to the wrong forum earlier.

I'm trying to run the Wunderground colored table history script. When I run the script, I get this error:

ERROR: no data for http://change_to_your-site_in_wsReports1part.php/WXDailyHistory.php?ID=KNCMOREH2&month=01&day=01&year=2016&format=1&graphspan=year

I have been running Weather Underground for my site KNCMOREH2 for several years now.

Any help is appreciated,
Chris
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 13, 2020, 12:27:46 PM
I posted this question to the wrong forum earlier.

I'm trying to run the Wunderground colored table history script. When I run the script, I get this error:

ERROR: no data for http://change_to_your-site_in_wsReports1part.php/WXDailyHistory.php?ID=KNCMOREH2&month=01&day=01&year=2016&format=1&graphspan=year

I have been running Weather Underground for my site KNCMOREH2 for several years now.

Any help is appreciated,
Chris

Please be specific.
Your last post https://www.weather-watch.com/smf/index.php/topic,68752.msg555633.html#msg555633
=> is about a version 4 forecast script wsfct4/wsIncWuCreate.php 

Now you are posting in the forecast topic about  the coloured table script

The general support page with all links for all Leuven scripts  is at: https://support.leuven-template.eu/
For the script you are now talking about the support topic is:
https://www.wxforum.net/index.php?topic=36473.msg374472#msg374472

This readme describing how to install the MITM scripts is included in the download and should be in the wsreports folder on your server also.  https://www.weerstation-herent.be/wsreports/WU_CSV_problems_readme.pdf

But if you post in the forum without a link to the start-page of the script,  nobody can help you as, AFAIK, none of the visitors on this forum is clairvoyant.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: plex on February 16, 2020, 01:37:49 AM
Hello weather enthusiasts and Leuven users

After spending time with other templates, I decided to do a fresh Leuven installation, because it’s still a fantastic template - I really like how customizable it is. So thanks to Wim for keeping it alive.

However I need some help, because I’m struggling with some errors while debugging.

Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186

Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186

Notice: Undefined index: weatherDescDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 189

Thanks in advance and happy windy Sunday




Sent from my iPad using Tapatalk
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 16, 2020, 03:10:28 AM
Hello weather enthusiasts and Leuven users
After spending time with other templates, I decided to do a fresh Leuven installation, because it’s still a fantastic template - I really like how customizable it is. So thanks to Win for keeping it alive.
However I need some help, because I’m struggling with some errors while debugging.
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: weatherDescDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 189
Thanks in advance and happy windy Sunday
Sent from my iPad using Tapatalk

The link to the page: https://www.vejrstationen.dk/weather28/index.php?p=ws_metno_page&lang=en

Thanks for bringing these "notices", not "errors"  to my attention. I knew there were some changes scheduled in the 1.9 API.
I do not get these notices myself, but it seems that the time is right to start debugging.
I will use your settings for that "Data for latitude=55.899269 - longitude= 8.516578"

@ALL When switching debug to false in your settings, the notices will not be shown, nor appear in in the logs.
These are not "errors", it are "notices" to the script author that the scripts need to be enhanced.
When in  debug mode the scripts print all possible messages "notice", "strict",  "deprecated",  "warning", "error" and "fatal"

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: plex on February 16, 2020, 03:24:21 AM
Hello weather enthusiasts and Leuven users
After spending time with other templates, I decided to do a fresh Leuven installation, because it’s still a fantastic template - I really like how customizable it is. So thanks to Win for keeping it alive.
However I need some help, because I’m struggling with some errors while debugging.
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: weatherDescDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 189
Thanks in advance and happy windy Sunday
Sent from my iPad using Tapatalk

The link to the page: https://www.vejrstationen.dk/weather28/index.php?p=ws_metno_page&lang=en

Thanks for bringing these "notices", not "errors"  to my attention. I knew there were some changes scheduled in the 1.9 API.
I do not get these notices myself, but it seems that the time is right to start debugging.
I will use your settings for that "Data for latitude=55.899269 - longitude= 8.516578"

@ALL When switching debug to false in your settings, the notices will not be shown, nor appear in in the logs.
These are not "errors", it are "notices" to the script author that the scripts need to be enhanced.
When in  debug mode the scripts print all possible messages "notice", 'warning", "error" and "fatal"

Wim

Thanks for clearing this out Wim [tup]

I’m ignoring the message then, and moving on to production.





Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 16, 2020, 04:55:02 AM
@ALL When switching debug to false in your settings, the notices will not be shown, nor appear in in the logs.
. . . shortened . . .
Wim
Thanks for clearing this out Wim [tup]
I’m ignoring the message then, and moving on to production.

The last hourly forecast seems "incomplete", but not in all cases.
I added some code to use the icon and description from the 6-hour forecast when there is no corresponding hourly data.

Could you ,please use this version for a few days?
You can always check if there are errors by adding &debug to the url

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on August 01, 2020, 06:01:11 AM
Looks like Yrno forecast is also changed.
Not sure if there is already a topic about.
The Leuven support forum is not readable for me anymore.
The xml has changed.
Well something to do I guess.

The yr.no forecasts contain a hidden warning to the script-programmers.
Quote
NB!!! Since we have no other options to contact our users of forecast.xml, we have decided to use this method to get your attention to some major changes with our API
In the first quarter next year, forecast.xml and forecast_hour_by_hour.xml will be discontinued in favour of a newer JSON API.
Vi encourage you already now to switch to the new API.
There are a lot of changes, and you can read all the technical details in our new developer portal https://developer.yr.no

They also show a message to read that warning in the data-fields on some forecasts during the day.
That is their only way to bring this to the script-authors attention, but it looks not nice for the visitors of the websites.

The yr.no script will not be adapted as yr.no data will be replaced with data identical to met.no.
The yrno and metno forecast  will be identical.  You should remove the Yr.no forecast from the menu early 2021.
It is not clear yet, if we can continue to use the yr.no meteogram-image and the full page .pdf.

The met.no script needs will need   
* 1 minor change, the version number in the URL should be changed from 1.9 to 2.0
and
* will remain identical when we add a new "classic" keyword.  Clarification added 2020-08-11 11:40 CEST
I am testing it and the resulting xml seems identical, but I will follow closely if that will change.

DO NOT change to version 2.0 yourself without checking the API documentation. You are on your own with that.
Let me test it first.  The 1.9 version is still the current production metno version.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: kyomar on August 11, 2020, 01:56:05 AM
Hi Wim,

thanks for the info about the warning concerning the yr.no script - much appreciated. I have just noticed this myself and are now trying to change the script to metno. The scripts have changed quite a bit but managed - thanks to the readme file -  to set it up. Nevertheless I must have made a mistake somewhere as I am not able to get it working ("invalid forecast data retrieved, check the html for errors"). Any ideas what I might have missed? I am a bit confused with point 7. in the stand-alone tab.

Thanks for your time (and this awesome scripts) and best regards,
Markus
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on August 11, 2020, 02:26:11 AM
Hi Wim,

thanks for the info about the warning concerning the yr.no script - much appreciated. I have just noticed this myself and are now trying to change the script to metno. The scripts have changed quite a bit but managed - thanks to the readme file -  to set it up. Nevertheless I must have made a mistake somewhere as I am not able to get it working ("invalid forecast data retrieved, check the html for errors"). Any ideas what I might have missed? I am a bit confused with point 7. in the stand-alone tab.

Thanks for your time (and this awesome scripts) and best regards,
Markus

And I am a bit confused also as i am not clairvoyant.
I even checked your previous posts but i can not find a working link to a leuven-metno script.

Without a link to the script there is nothing i or anyoneelse can do.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: kyomar on August 11, 2020, 03:02:23 AM
Thanks a lot Wim for your prompt reply. Clairvoyant, I have learned something new :grin: - English is not my mother tongue.

I haven't uploaded the new scripts to my online page, I am just testing locally (xampp). I have attached the three files I have edited: (sorry didn't work with the attachments). How can I attach txt files without cluttering the whole page?
Edit: weird it seems to have worked after all (attachments).
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on August 11, 2020, 05:13:22 AM
. . .Nevertheless I must have made a mistake somewhere as I am not able to get it working ("invalid forecast data retrieved, check the html for errors").
. . .
Well, next time I will not even look and invest my precious spare time if you do not include an accessible link  with your post.

You should have  posted the complete message which appeared before the complete forecast. You gave me the impression that there was no forecast at all.
I copied your two files to the original download and the weather-forecast appeared correctly. See attached screenshot.
But also a clear message, first line with the link, second line to check the html
Code: [Select]
No data was retrieved for http://www.temis.nl/uvradiation/nrt/uvindex.php?lon=137.86&lat=36.7

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

The UV part does not come from met.no but from temis.nl
You could have done a lot of  yourself by copying that link that displayed link to your browser yourself and notice it takes about a minute before the website answers.
That is too long for your visitors to wait.  We wait only 4-10 seconds and then try to use the cache, which can be to old to use also.
In that case there is a one-time message every new ( 1/hour approx.) generating of the cached files.
Only if "error messages" is switched on, of course, which you can switched off in line 12 of the settings.

For missing data there is also always a setting
=> line 76 in wsMetnoPage.php, set to false and there will be no error for to old UV cache and a stalled UV-server even with "error messages on".

You also mentioned:
Quote
thanks for the info about the warning concerning the yr.no script - much appreciated.
...
The scripts have changed quite a bit but managed  - thanks to the readme file 

Good work, fine that you "managed", fine that you "appreciate" all the hard work

By the way, the fact that those scripts are donation-ware never changed in the past 6 years.

succes, Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: kyomar on August 11, 2020, 08:59:38 PM
Finally I got it running, thank you so much for your help Wim - outstanding support.
At the end I found the problem. You noted the solution here: "DO NOT change to version 2.0 yourself without checking the API documentation. You are on your own with that. Let me test it first. The 1.9 version is still the current production metno version", which wasn't there when I read that post or didn't see it and therefore of course did the change to 2.0. Reversing it to 1.9 did the trick.

Quote
You should have  posted the complete message which appeared before the complete forecast. You gave me the impression that there was no forecast at all.
I am sorry for the troubles but all I saw was the error message: "invalid forecast data retrieved, check the html for errors".

Anyhow, all is working fine now. Great scripts and amazing support.

Thanks a lot, Markus


Title: Re: Support of the "Leuven" Forecast scripts
Post by: kyomar on August 14, 2020, 09:45:18 PM
Hi Wim,

comparing the output (forecasts) from met.no to yr.no shows that they are quite different. Somehow the forecasts in met.no don't line up with the times (e.g. this morning shows the afternoon forecast and so on). I don't know how to explain it in an understandable language and I have therefore attached a pdf comparing the to forecasts.

I remember that a long time ago when I first came across your scripts I installed the metno scripts and then switched to yrno for that same reason. As the yrno scripts are going to not be continued I have to find out the problem so I can switch to metno in due time.

I have send you a pm with the link to the yrno scripts if needed.

Thank you and have a nice weekend.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on August 15, 2020, 03:10:24 AM
Hi Wim,

comparing the output (forecasts) from met.no to yr.no shows that they are quite different. Somehow the forecasts in met.no don't line up with the times (e.g. this morning shows the afternoon forecast and so on). I don't know how to explain it in an understandable language and I have therefore attached a pdf comparing the to forecasts.

I remember that a long time ago when I first came across your scripts I installed the metno scripts and then switched to yrno for that same reason. As the yrno scripts are going to not be continued I have to find out the problem so I can switch to metno in due time.

I have send you a pm with the link to the yrno scripts if needed.

Thank you and have a nice weekend.

I am more then willing to investigate.

But without link a website running the original scripts, there is not much I can do.
A screenshot does not explain anything, a script which I can run, settings I can check is what is needed.

Do not change the new metno scripts as you did with your yrno scripts.
There is really no need to  rename all scripts to hakubaprintfull.php  a.s.o.
No need to change any code lines outside the settings.

This makes supporting for me impossible.

Maybe you should change the wording for afternoon / morning a.s.o.
MetNo scripts use  the 6 hour periods  00 06 12 18 UTC.  => morning is from 09-15 for your timezone
Yrno has the first periods adapted to your local timezone, the remaining are also in UTC.  => morning is 06-12  for the first few days.

Also you could try another forecast such as WeatherUnderground.
Otherwise there are multiple fine forecasts available from other sources for your area.
Just a small Google search will help you to find other ones.
Please compare those different forecasts, maybe that gives you a forecast better suited for your goal.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: kyomar on August 15, 2020, 05:20:34 AM
Thanks Wim for your help - greatly appreciated.

I haven't renamed the metno scripts as it is indeed easier leaving them as is (exception wsFctMetnosmall4 to wsFctMetnoIcons4 as it made more sense in my case).

I am at a complete loss about the times, how they are transformed/changed from UTC to JST. Something just doesn't make sense to me. Why is in JST morning from 09 -15? Why are we moving everything +6 hours? Shouldn't it be +9 hours? I tried to understand wsIncMetnoCreate but haven't bent my brain around it yet.

I am already using another local forecast for my personal use, but they don't provide a website script. As far as I know only met.no resp. yr.no provide weather for my town (small town).

I will try to find a solution.

Cheers, Markus
Title: Re: Support of the "Leuven" Forecast scripts
Post by: edgar57 on February 11, 2021, 09:50:18 AM
Hello.

Can you help me a little?

Installed leuven template on my website.

How to remove/hide these php path-s from site? Where to switch off?
(like:
.../public_html/nautical/weatherpro/_widgets/float_top.php
.../public_html/nautical/weatherpro/wsyrnofct/ws_yrno_page.php/
.../public_html/nautical/weatherpro/wsyrnofct/yrnoGenerateHtml.php
.../public_html/nautical/weatherpro/wsyrnofct/yrnosettings.php
.../public_html/nautical/weatherpro/wsyrnofct/yrnoCreateArr.php
...public_html/nautical/weatherpro/wsyrnofct/yrnoCreateDetailArr.php)
And so on?

(http://[attachment id=1 msg=424834][/attachment])
 [ You are not allowed to view attachments ]


Thank You!
Edgar
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 11, 2021, 10:11:20 AM
. . .
Installed leuven template on my website.
. .
All links to the correct support topics => https://support.leuven-template.eu/

This topic is meant for Leuven forecast scripts.

The Leuven Template is not downloadable for months. It is EOL.
You are not on any user-list, not for the 2.8a release, not for the country you are in.
This has been a donation-ware product also. Please request support at the person who sent you the zip.

Based on the screenshots I could find your site.
This is version 2.8a (beta) from 2015
Modified with instructions such as
Code: [Select]
require_once 'lib/Util.php';
Util::checkShowSource(__FILE__);
The last data on your website Last updated: :  02-06-2015  18:18 => 18:19
Also even before the first line of output of the scripts there one or more lines displayed.
Seems that you also installed a "trace" displaying the full-path to every php script loaded.
Example http://hotserv.eq.ee/nautical/weatherpro/startHere.php
Code: [Select]
/home/edgarnuum/domains/hotserv.eq.ee/public_html/nautical/weatherpro/startHere.php
startHere.php (v2.8): This small program test your web server settings if they prohibit installing the Leuven-template.

You only need to run this program in step3 of the install procedure.

I think it has nothing to do with the Leuven Template, maybe you set a debug switch somewhere in cPanel

As far as I can decipher the messages, they refer to yr.no
That forecast provider quit last year, so better switch to met.no if that still works.


I strongly advise to start using
MeteoTemplate => http://www.meteotemplate.com/web/index.php
Large template, interesting features, ample support.

Saratoga Template & Scripts: https://saratoga-weather.org/wxtemplates/
By far the one with the most knowledgable users to help you.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on February 23, 2021, 03:00:13 PM
good evening wilm I use your forecast script with the yr.no forecasts on my site www.meteolimoux.fr it is a file that I had downloaded 2 or 3 years ago I think. for the moment the forecasts yn.ro still works but according to the information it will stop working so I would like to switch to another forecasting system similar to yn.ro met.no seems to me very good, I have to modify something thing in the wsfct4 file? I ask this question because I do not want to make a false manipulation before starting thank you in advance [tup] [tup]
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 24, 2021, 02:59:18 AM
good evening wilm I use your forecast script with the yr.no forecasts on my site www.meteolimoux.fr it is a file that I had downloaded 2 or 3 years ago I think. for the moment the forecasts yn.ro still works but according to the information it will stop working so I would like to switch to another forecasting system similar to yn.ro met.no seems to me very good, I have to modify something thing in the wsfct4 file? I ask this question because I do not want to make a false manipulation before starting thank you in advance [tup] [tup]

Both yr.no and met.no forecasts still work Ok at your website.
The met.no seems OK to me, no changes needed => https://meteolimoux.fr/wsfct4/wsFctMetnoPage4.php
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on February 24, 2021, 05:25:52 AM
yes indeed it works well the only thing is that I did not touch anything at the level of the geolocation for the reception of the weather data of my village.
for the yn.ro I remember having informed something but I do not know where else on the script at the bottom right one can see it
Forecasts created on: 24-02-2021 02:19 (France / Languedoc-Roussillon / Limoux-Flassian% 20Railway% 20Station /
For the met.no script there is marked Forecast created on 02-24-2021 09:17 (43.07181 2.21743) also at the bottom right
What do you think
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 24, 2021, 05:41:38 AM
yes indeed it works well the only thing is that I did not touch anything at the level of the geolocation for the reception of the weather data of my village.
for the yn.ro I remember having informed something but I do not know where else on the script at the bottom right one can see it
Forecasts created on: 24-02-2021 02:19 (France / Languedoc-Roussillon / Limoux-Flassian% 20Railway% 20Station /
For the met.no script there is marked Forecast created on 02-24-2021 09:17 (43.07181 2.21743) also at the bottom right
What do you think

It is clearly described in the readme at your websitehttps://meteolimoux.fr/wsfct4/readme.html
When you setup the forecast script you entered all common details as needed for the forecasts.
Check your . . . /wsfct4/_metric-settings.php for your correct latitude / longitude you have entered there.

Those scripts near the EOL (End-Of_Live),
and as it took a lot of time to develop those scripts 
and sadly only a few users  supported me (https://support.leuven-template.eu/userlistScripts.php) to maintain them
==> you should find some other forecast scripts to use on your website in a few years.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on February 24, 2021, 05:56:50 AM
yes and as you specify I am one of those people
France WU colored table Limoux meteolimoux.fr/ 10 euro in 2018
I took a good look at what you just told me, everything seems good to me all of a sudden everything is well configured.
thank you, have a nice day
Title: Re: Support of the "Leuven" Forecast scripts
Post by: martin150 on February 25, 2021, 01:08:01 AM
Hi Wim, could you please help me again with a problem at YR since few days?

Following error on my site:
Code: [Select]
ERROR module yrnoCreateArr.php (87): Unable to retrieve xml for http://www.yr.no/place/Austria/Upper_Austria/Rindlberg//varsel.xml
ERROR module yrnoGenerateHtml.php (39): No data retrieved - forecast not possible
The adress is working and including forecast datas, but "No data retrieved??"

lg
martin
http://www.hildner.at/weather28

BTW: I started already using meteotemplate but not much time in the moment to configure.... So if theres a solution it would be great ...

Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 25, 2021, 03:03:14 AM
Hi Wim, could you please help me again with a problem at YR since few days?

Following error on my site:
Code: [Select]
ERROR module yrnoCreateArr.php (87): Unable to retrieve xml for http://www.yr.no/place/Austria/Upper_Austria/Rindlberg//varsel.xml
ERROR module yrnoGenerateHtml.php (39): No data retrieved - forecast not possible
The adress is working and including forecast datas, but "No data retrieved??"

lg
martin
http://www.hildner.at/weather28

BTW: I started already using meteotemplate but not much time in the moment to configure.... So if theres a solution it would be great ...

This is a Leuven-Template script. Not a separate forecast script.
The yr.no server only understands https , you have to change two scripts

weather28/weather28/wsyrnofct/yrnoCreateArr.php  change line 47
weather28/weather28/yrnoCreateDetailArr.php change line 46
0 => 'http://www.yr.no/place/',       should be changed to
0 => 'https://www.yr.no/place/',

===
This is the link in the template error message: https://www.yr.no/place/Austria/Upper_Austria/Rindlberg//varsel.xml
When you check the returned data:
Code: [Select]
<!-- NB!!! Since we have no other options to contact our users of forecast.xml, we have decided to use this method to get your attention to some major changes with our API -->
<!-- This summer, forecast.xml and forecast_hour_by_hour.xml will be discontinued in favour of a newer JSON API. An exactly date is not set yet. -->
<!-- Vi encourage you already now to switch to the new API. -->
<!-- There are a lot of changes, and you can read all the technical details in our new developer portal https://developer.yr.no -->

So shortly the data will not be available anymore. But the met .no forecast is (probably) not affected.

Wim

============  @ALL Leuven users:  ==============

As the Leuven-Template is End Of Live
Check out these well supported Weather-website templates:

MeteoTemplate: http://www.meteotemplate.com/web/index.php

Saratoga Template & Scripts: https://saratoga-weather.org/template/

weather34, the original dashboard version: https://weather34.com/homeweatherstation/

PWS_Dashboard another dashboard  https://pwsdashboard.com
Title: Re: Support of the "Leuven" Forecast scripts
Post by: martin150 on February 25, 2021, 04:25:42 AM
Tnx for your help  =D&gt; \:D/.
I checked the data only about forecast info, sorry  :roll:
Where can i change the setting that met.no is shown on the startpage (not yr) ?
Sorry for the questions but your template is running so stable [tup] that nothing is to do long time, and so its difficult if something to change  :-)

lg
martin
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 25, 2021, 04:31:08 AM
Tnx for your help  =D&gt; \:D/.
I checked the data only about forecast info, sorry  :roll:
Where can i change the setting that met.no is shown on the startpage (not yr) ?
Sorry for the questions but your template is running so stable [tup] that nothing is to do long time, and so its difficult if something to change  :-)

lg
martin

Your settings (. . /weather28/_my_texts/wsUserSettings.php ) line about 181 change to
Code: [Select]
# Default forecast on the start-page
$SITE["fctOrg"]   = "metno";  # wxsim = WXSIM needs extra program = all  |  yrno = Yrno needs area code = all  |  metno = MetNo = all  |  yowindow = YoWindow gadget = all  |  noaa = NOAA = america  |  ec = Environment Canada = canada  |  hwa = Het Weer Actueel - alleen voor leden = europe

Succes,
Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: martin150 on February 25, 2021, 04:54:00 AM
Tnx all ok again !

LG
Martin
Title: Re: Support of the "Leuven" Forecast scripts
Post by: kyomar on March 02, 2021, 07:37:18 PM
Hi Wim, hope this message finds you well.

From 1st of March the met.no forecast stopped working. I remembered our conversation about version 1.9 and checked the metno api and they moved to version 2.0. But just changing the version number didn't work, had to add /classic/ and all is working fine again.
Changed line 50 in wsIncMetnoCreate.php:
from;
Quote
api.met.no/weatherapi/locationforecast/1.9/
to:
Quote
api.met.no/weatherapi/locationforecast/2.0/classic/

Hope this info is useful for others as well.

Thanks for this amazing script!
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 03, 2021, 02:37:04 AM
Hi Wim, hope this message finds you well.

From 1st of March the met.no forecast stopped working. I remembered our conversation about version 1.9 and checked the metno api and they moved to version 2.0. But just changing the version number didn't work, had to add /classic/ and all is working fine again.
Changed line 50 in wsIncMetnoCreate.php:
from;
Quote
api.met.no/weatherapi/locationforecast/1.9/
to:
Quote
api.met.no/weatherapi/locationforecast/2.0/classic/

Hope this info is useful for others as well.

Thanks for this amazing script!

Thanks   =D&gt; you beat me with this 1 day.

Always check the demo site https://www.weerstation-herent.be/wsfct4/wsFctMetnoPage4.php  if the problem is there also.

Script wsIncMetnoCreate.php line 50 should look like this
Code: [Select]
$ws_metno_url     = 'https://api.met.no/weatherapi/locationforecast/2.0/classic/?lat='.$yourLatitude.'&lon='.$yourLongitude
Also the UV forecast URL is changed end last year from http:// to https://
Script wsIncUvScrape.php line 59 should look like this
Code: [Select]
$ws_uv_url      = 'https://www.temis.nl/uvradiation/nrt/uvindex.php?lon='.$wsUvLongitude.'&lat='.$wsUvLatitude;
Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Fabrice on March 13, 2021, 03:33:09 AM
Hello.

I am trying to test the latest V4 version for my predictions.
I wish I could create a menu at the top of the forecast with a choice of other cities for my visitors.
Simply have a drop-down menu.
Thank you for telling me how to have from the same page the possibility of accessing forecasts from other places.
Here is my test page: http://test.meteo01.fr/ws/wsFctMetnoPage4.php

Fabrice
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 13, 2021, 03:48:56 AM
Hello.

I am trying to test the latest V4 version for my predictions.
I wish I could create a menu at the top of the forecast with a choice of other cities for my visitors.
Simply have a drop-down menu.
Thank you for telling me how to have from the same page the possibility of accessing forecasts from other places.
Here is my test page: http://test.meteo01.fr/ws/wsFctMetnoPage4.php

Fabrice

Thanks for testing one of my scripts.
The idea of the script is to have an "large" adaptable forecast of your own area  .

There is no such feature as a "Simply have a drop-down menu." of "forecasts from other places."

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Fabrice on March 13, 2021, 04:00:24 AM
Hello.
Thank you for your reply.
I will see how I can create this drop down menu for my personal needs.
Because I found this example using your version V 3.5 on this site: http://www.meteonarbonne.fr/index.php?p=51-2&lang=fr
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 13, 2021, 04:05:46 AM
Hello.
Thank you for your reply.
I will see how I can create this drop down menu for my personal needs.
Because I found this example using your version V 3.5 on this site: http://www.meteonarbonne.fr/index.php?p=51-2&lang=fr

But that one is not using the frorecast script to do that.
It is an extra layer around a lot of scripts (metar, foecasts a.o.).
It is also using different kind of settings for that.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Fabrice on March 13, 2021, 07:04:02 AM
ok thanks.

I am also trying to remove in the forecast table the mention of the force of the Beaufort wind (example 2, 3 ...) or even remove the mention of the breeze. What should be deleted for all of this ?.

Thank you.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 13, 2021, 07:15:15 AM
ok thanks.

I am also trying to remove in the forecast table the mention of the force of the Beaufort wind (example 2, 3 ...) or even remove the mention of the breeze. What should be deleted for all of this ?.

Thank you.

For that you need to edit the scripts, as that has never been an option nor a request to implement a setting for that.
But probably there are far better scripts which suits you more. Just browse the internet and forums,

Succes,
Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 on April 02, 2021, 03:20:13 AM
Hi

Could I please have help to fix this problem  All was good until yesterday.  I have not changed any script.  My website is:  https://www.kstwx.net/wxnorwayfcst.php.  The first attachment is a screenshot from my desktop whilst the second is what appeared on my iPad today.  Yesterday both appeared on my desktop (Win 10).

Thanks

Keith


 [ You are not allowed to view attachments ]
 [ You are not allowed to view attachments ]
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on April 02, 2021, 04:33:00 AM
Hi
Could I please have help to fix this problem  All was good until yesterday.  I have not changed any script.  My website is:  https://www.kstwx.net/wxnorwayfcst.php.  The first attachment is a screenshot from my desktop whilst the second is what appeared on my iPad today.  Yesterday both appeared on my desktop (Win 10).
Thanks
Keith

Thanks for using the Leuven forecast script. 
Never knew there was a user of them in Australia https://support.leuven-template.eu/userlistScripts.php

Answered in this topic with post #41 by @kyomar and #42 by me, just before your question:
https://www.wxforum.net/index.php?topic=36478.msg426228#msg426228

As you are using an older version, the line numbers are:
wsMetnoCreate.php => line 52
wsUFct4.php => line 58

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 on April 02, 2021, 09:07:48 PM
Hi

Thanks for your quick response:  all fixed.  By all means, add me to the users list for Norway forecasts.  https://www.kstwx.net/index.php.

best wishes

Keith

Title: Re: Support of the "Leuven" Forecast scripts
Post by: MarkDM on April 08, 2021, 12:31:02 PM
Hello,
I noticed my forecast page was not working anymore. Thanks to this thread a found the cause.
But there is a problem in the solution. The script is working, even stand-alone without enclosing html:
https://weerstationberlare.be/wsfct4/wsFctMetnoPage4.php (https://weerstationberlare.be/wsfct4/wsFctMetnoPage4.php)

I adapted the file wsMenuData.xml for it:
Quote
<item   nr      = "wsForecast"   
        caption = "Forecast"
        link    = "wsfct4/wsFctMetnoPage4.php"         
        gizmo   = "1"   
/>
This not working, the menu-button "Vooruitzicht" (translated) keeps pointing to the old target:
https://weerstationberlare.be/ (https://weerstationberlare.be/)

Is there something else I have to activate ? It doesn't seems a cache problem.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on April 08, 2021, 01:02:07 PM
Hello,
I noticed my forecast page was not working anymore. Thanks to this thread a found the cause.
But there is a problem in the solution. The script is working, even stand-alone without enclosing html:
https://weerstationberlare.be/wsfct4/wsFctMetnoPage4.php (https://weerstationberlare.be/wsfct4/wsFctMetnoPage4.php)

I adapted the file wsMenuData.xml for it:
Quote
<item   nr      = "wsForecast"   
        caption = "Forecast"
        link    = "wsfct4/wsFctMetnoPage4.php"         
        gizmo   = "1"   
/>
This not working, the menu-button "Vooruitzicht" (translated) keeps pointing to the old target:
https://weerstationberlare.be/ (https://weerstationberlare.be/)

Is there something else I have to activate ? It doesn't seems a cache problem.
This is a thread for the stand-alone (+Saratoga) forecast scripts.
They are not integrated with the Leuven-Template. They are having multiple errors as they are not positioned at the correct folder.
Code: [Select]
Warning: include_once(./ws_set_environment.php): failed to open stream: No such file or directory in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 144

Warning: include_once(): Failed opening './ws_set_environment.php' for inclusion (include_path='.:/opt/alt/php70/usr/share/pear') in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 144

Warning: include(./_metric_settings.php): failed to open stream: No such file or directory in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 146

Warning: include(): Failed opening './_metric_settings.php' for inclusion (include_path='.:/opt/alt/php70/usr/share/pear') in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 146

Fatal error: Uncaught Error: Call to undefined function ws_debug_times() in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php:152 Stack trace: #0 /home/uitber1q/weerstation/index.php(331): include() #1 {main} thrown in /home/uitber1q/weerstation/wsfct4/wsFctMetnoPage4.php on line 152
It is a lot more work  to use the stand-alone scripts. https://weerstationberlare.be/wsfct4/readme.html
You need to run them in an iFrame if using them in any template.

Better use the built-in version in the Leuven Template
The UV and MetNo forecast scripts in the Leuven-Template need only a small modification
=> https://support.leuven-template.eu/problems28.php?lang=nl
Or on the HWA forum at https://www.hetweeractueel.nl/forum/viewtopic.php?f=226&t=70313&sid=b89f274a86cca82b4948c976598fada3#p73098

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: MarkDM on April 08, 2021, 03:10:24 PM
Thank you Wim.
It works again with this small modification on the original script.
Regards,
Mark
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on October 05, 2021, 04:09:57 AM
hello everyone today all of the forecast scripts have stopped working. i thought the met.no is going to keep working that seems to have shut down as well. What gives on your side. Good day to you
i havz that on all yr met no ect.....
no forecast data can be retrieved, check the html for errors
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on October 05, 2021, 04:52:46 AM
hello everyone today all of the forecast scripts have stopped working. i thought the met.no is going to keep working that seems to have shut down as well. What gives on your side. Good day to you
i havz that on all yr met no ect.....
no forecast data can be retrieved, check the html for errors
Hi @lacouste,

I am confused about the word "all in your message"
I currently support 9 different forecast scripts. Only 1 has some intermittent problems until February 1, 2022 and will stop working on that date.

As announced end of 2020 by Yr.no  their xml-forecast will not be functional in the near future.
From  October 1st, the yr.no forecasts API in the current format, example  https://www.yr.no/place/Belgium/Flanders/Herent/varsel.xml has indeed "man-made" problems to warn you of that change. 

This is their message they will return for a few days, then they will supply the data again for a few day/weeks and that message / data will be repeated until February 1 next year.:
Quote
This service will be retired on February 1st, 2022. Please go to https://developer.yr.no/doc/guides/getting-started-from-forecast-xml/ to get started with our new API. This service will have random interuptions until the final end of life date February 1st, 2022.

When you read the information on the developer.yr.no pages, you see that they switched to using met.no data directly.

THEREFOR there is no need to develop a new yr.no script as the data is identical as used in the current met.no script.

The met.no forecast scripts works without problems, now and in the "foreseeable" future.  ;)

Regards,

Wim

P.S. I started with 12 forecast scripts and indeed 4 data-sets are not available anymore.   
Not bad for scripts from 2015-2018 also considering that only 18 users helped supporting those scripts directly (https://support.leuven-template.eu/userlistScripts.php).
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on October 05, 2021, 05:34:59 AM
hello kim I am also confused because as you announced yn.ro had to stop working so for that no problem on the other hand in my wsfct4 folder the rest of the programs no longer work also I still have error messages
for http://meteolimoux.fr/wsfct4/wsFctDarksPage4.php
 I have This scripts needs an API-key, please check the docs

for metno http://meteolimoux.fr/wsfct4/wsFctMetnoPage4.php I have no forecast data can be retrieved, check the html for errors

for http://meteolimoux.fr/wsfct4/wsFctWuPage4.php I have This scripts needs an API-key, please check the docs

for http://meteolimoux.fr/wsfct4/wsFctWxsimPPage.php I have Error input file not found, cache file not found either => ../ complaintxt.txt
Scripts failed, check html for problems

for yahoo I have No data was retrieved for https://query.yahooapis.com/v1/public/yql?q=select+*+from+weather.forecast+where+woeid+in+(SELECT+woeid+FROM+geo .places + WHERE + text = "(43.071812,2.217438)") + & format = json

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

all the programs no longer work in my folder
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on October 05, 2021, 05:53:21 AM
hello kim I am also confused because as you announced yn.ro had to stop working so for that no problem on the other hand in my wsfct4 folder the rest of the programs no longer work also I still have error messages
for http://meteolimoux.fr/wsfct4/wsFctDarksPage4.php
 I have This scripts needs an API-key, please check the docs

for metno http://meteolimoux.fr/wsfct4/wsFctMetnoPage4.php I have no forecast data can be retrieved, check the html for errors

for http://meteolimoux.fr/wsfct4/wsFctWuPage4.php I have This scripts needs an API-key, please check the docs

for http://meteolimoux.fr/wsfct4/wsFctWxsimPPage.php I have Error input file not found, cache file not found either => ../ complaintxt.txt
Scripts failed, check html for problems

for yahoo I have No data was retrieved for https://query.yahooapis.com/v1/public/yql?q=select+*+from+weather.forecast+where+woeid+in+(SELECT+woeid+FROM+geo .places + WHERE + text = "(43.071812,2.217438)") + & format = json

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

all the programs no longer work in my folder
I think you maybe have an old download?
Please check the current working scripts
=> https://support.leuven-template.eu/
===> https://www.weerstation-herent.be/wsfct4/

WU an Yahoo stopped years ago, they are therefor not in the demo.

Yr.no will have the "nag" message for a few days and will on/off work again until Februari next year.

DarkSky always needs an API-key, the scripts will work at least to end of December 2022.
But DarkSky will not accept new users as it was bought by Apple. If you have no DarkSky api key, the scripts will not work.

WXSIM can only be used when you have the paid-for WXSIM forecasting programs (windows only) and upload the data files to your web-site.

Met.no should work, but the API url changed so check these two topics for the answer here
https://www.wxforum.net/index.php?topic=36478.msg426228#msg426228
There the change needed in line 50 of wsIncMetnoCreate.php is described

@ALL Please always check the support => demo-site and see if it works there.  [tup]

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on October 05, 2021, 07:18:17 AM
hi wilm i made the modification on line 50 but i get this error message
unknown error Warning: file_put_contents(./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr): failed to open stream: No such file or directory in /customers/5/5/d/meteolimoux.fr/httpd.www/wsfct4/ws_set_environment.php on line 181
ws_save_cache: ERROR Could not save data to cache (./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr).
Please make sure your cache directory exists and is writable.
Program ends
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on October 05, 2021, 07:32:10 AM
hi wilm i made the modification on line 50 but i get this error message
unknown error Warning: file_put_contents(./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr): failed to open stream: No such file or directory in /customers/5/5/d/meteolimoux.fr/httpd.www/wsfct4/ws_set_environment.php on line 181
ws_save_cache: ERROR Could not save data to cache (./cache/wsIncMetnoHtml4_c_mm_kmh_hpa_cm_km_43-071812_2-217438.arr).
Please make sure your cache directory exists and is writable.
Program ends

I think the message (in red) is very clear.

Are you sure you have officially downloaded the scripts between 2018 and today?

There should be a folder with the name "cache", it should be in your  wsfct4/  folder in your download area in your pc/mac also.

Normally when you upload the wsfct4 folder from the pc/mac to your webserver, all folders and scripts are copied and ​get the same "rights" as in the download.

So it is nearly impossible that the cache/ folder is not there.  Check your download folder.
Or use your FTP program to create a cache folder inside your  wsfct4 folder.

If you check the contents of your wsfct4 folder it should look more or less like this screenshot, 7 folders and a lot of scripts.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on October 05, 2021, 12:00:00 PM
I just looked I downloaded the folder on 08/02/2018 I don't have a cache file in the meteolimoux.fr / wsfct4 / subfolder
I have img, js, lang, other, pp, saratoga root, on the other hand I have a cache file in the img folder
https://filemanager.one.com/#matthieu.coustal@wanadoo.fr/meteolimoux.fr/files/wsfct4/img/cache/
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on October 05, 2021, 12:02:29 PM
I just looked I downloaded the folder on 08/02/2018 I don't have a cache file in the meteolimoux.fr / wsfct4 / subfolder
I have img, js, lang, other, pp, saratoga root, on the other hand I have a cache file in the img folder
https://filemanager.one.com/#matthieu.coustal@wanadoo.fr/meteolimoux.fr/files/wsfct4/img/cache/
You need a cache folder inside the wsfct4/ folder.
That is what is needed for the scripts to save the data as downloaded from met.no

Succes,
Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on October 05, 2021, 12:11:46 PM
ok can I simply create it manually in my manger file from my web folder?
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on October 05, 2021, 12:16:33 PM
ok can I simply create it manually in my manger file from my web folder?
Yes, I hope so.
Also check if the error goes away after  that.
If not use your FTP program ow whatever to give the correct permissions.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: lacouste on October 05, 2021, 12:22:43 PM
thank you wilm it works now thank you =D&gt;
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ha-rob on November 11, 2021, 11:20:30 AM
Hello. I have used the Leuven template for many years. I have not done any changes in the script for a long time. A few days ago the script stopped working. Only a completely empty, grey page appears when typing the url: www.uranusweather.com

I hope for some help to fix this.

Best wishes :-)

Rob
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on November 11, 2021, 12:16:43 PM
Hello. I have used the Leuven template for many years. I have not done any changes in the script for a long time. A few days ago the script stopped working. Only a completely empty, grey page appears when typing the url: www.uranusweather.com

I hope for some help to fix this.

Best wishes :-)

Rob
Hi Rob,
 
PHP-version:
Checking with info.php => your provider or you yourself changed your website  to using PHP Version 8.0.12
That is a big change from 5.6 or 7.4 for which the template was tested.
And you will probably run into far more errors, if you continue to use PHP 8.0.xx versions for this template.

This topic you posted this question is for the Leuven-Forecast scripts discussion but your problem is in the Leuven-Template.
Next time,  post your questions in the template topic https://www.wxforum.net/index.php?topic=36504.0

Debug:
Running your website with "?debug=yes" shows the error is in wsAjaxDataLoad_v3.php
Code: [Select]
Parse error: syntax error, unexpected token "-",
expecting "]" in /customers/a/6/7/uranusweather.com/httpd.www/weather2/wsAjaxDataLoad_v3.php on line 451
The error  is a "parse error" and signals the script contains invalid PHP, and all further processing stops after a parse error.
So indeed you will have an empty grey page.

Script-source:
Listing the script with https://www.uranusweather.com/weather2/printScript.php?echo=wsAjaxDataLoad_v3.php
Line 451 is a comment line in your version and should not be parsed at all.
Seems a problem with the PHP-parser to me, not with the script.

Solution:
I copied your script and tested it with PHP 8.0.12 at my test-site => same error.
Change line 451 of your weather2/wsAjaxDataLoad_v3.php  from
Code: [Select]
#[forecast-text]to
Code: [Select]
# [forecast-text]Adding that extra space between the # and the rest of the comment removes the parsing error.

Wim

Title: Re: Support of the "Leuven" Forecast scripts
Post by: ha-rob on November 11, 2021, 04:15:14 PM
Hello. I have used the Leuven template for many years. I have not done any changes in the script for a long time. A few days ago the script stopped working. Only a completely empty, grey page appears when typing the url: www.uranusweather.com

I hope for some help to fix this.

Best wishes :-)

Rob
Hi Rob,
 
PHP-version:
Checking with info.php => your provider or you yourself changed your website  to using PHP Version 8.0.12
That is a big change from 5.6 or 7.4 for which the template was tested.
And you will probably run into far more errors, if you continue to use PHP 8.0.xx versions for this template.

This topic you posted this question is for the Leuven-Forecast scripts discussion but your problem is in the Leuven-Template.
Next time,  post your questions in the template topic https://www.wxforum.net/index.php?topic=36504.0

Debug:
Running your website with "?debug=yes" shows the error is in wsAjaxDataLoad_v3.php
Code: [Select]
Parse error: syntax error, unexpected token "-",
expecting "]" in /customers/a/6/7/uranusweather.com/httpd.www/weather2/wsAjaxDataLoad_v3.php on line 451
The error  is a "parse error" and signals the script contains invalid PHP, and all further processing stops after a parse error.
So indeed you will have an empty grey page.

Script-source:
Listing the script with https://www.uranusweather.com/weather2/printScript.php?echo=wsAjaxDataLoad_v3.php
Line 451 is a comment line in your version and should not be parsed at all.
Seems a problem with the PHP-parser to me, not with the script.

Solution:
I copied your script and tested it with PHP 8.0.12 at my test-site => same error.
Change line 451 of your weather2/wsAjaxDataLoad_v3.php  from
Code: [Select]
#[forecast-text]to
Code: [Select]
# [forecast-text]Adding that extra space between the # and the rest of the comment removes the parsing error.

Wim

Many thanks for your quick response, Wim,

I checked my email inbox and found an email from my provider some weeks ago where they notified me about a future php upgrade to version 8.0. So you have right. That´s the reason for my problems. I have tried the solution you suggested, but unfortunately it didn´t work. What I did instead, was to roll back to php version 7.4. But the sad thing is that my provider says the version 7.4 reaches "end of life" at 2022.11.28.

But so far so god. And I apologize for posting this in the wrong topic. Anyway, thanks for your tip.  [tup]

Rob
Title: Re: Support of the "Leuven" Forecast scripts
Post by: frisby75 on December 09, 2021, 06:38:37 AM
Hello,
I installed your Forecast scripts, but how do I set the Italian language? I put the file in the "lang" folder, set in the php file: lang: "it" but it doesn't translate it for me, why?
Thank you

@ALL  PLEASE ALWAYS INCLUDE THE URL TO YOUR WEBSITE / SCRIPT
As from now, no answers if you do not include the links.

@metosa
I will use the Italian language as example, but it works the same for most western languages
To install 1 extra language, follow these steps
  • In the wsfct4/lang/ folder copy one of the current language files f.i. fctlanguage-en.txt and change the name to  fctlanguage-it.txt
  • DO NOT COPY any other language file you may have, use only a copy of an existing file in the lang folder
  • Carefully change all texts at the right to Italian
  • Change the allowed languages around line 250 in your settings file , in this case _metric_settings.php to contain your new language
That array to change is below the warnings about knowing what you are doing. Be careful.
Code: [Select]
# ----------------------------------------------
#                              language settings
#-----------------------------------------------
$ws_langs_supported = array ('en', 'nl', 'fr', 'de');
Change to
Code: [Select]
# ----------------------------------------------
#                              language settings
#-----------------------------------------------
$ws_langs_supported = array ('en', 'nl', 'fr', 'de','it');

Wim

This is the file with the Italian translation. Just replace the current English file in wsfct4 LANG folder
Title: Re: MetNo doesnt shown on my hosting site but it worked on Local
Post by: pimohdaimaoh on January 04, 2022, 03:49:35 AM
Hello,

After I noticed that my OLD YrNo created by Wvdkuil on my webpage is no longer functional I download your new script and to add MetNo instead.

First on my local web http://127.0.0.1 for example test it is working HOWEVER when I uploaded to my hosting site it only shows this (see attached image), I only changed the file names which are easy for me to remember inside folder where I put it but the scripts are still same intact.

http://www.pimohweather.com/YRNO.php

it supposed to be this (see the second image)

is there part on the script that dissallows to viewed on hosting site? please let me know.


regards

-Mike-
Title: Re: MetNo doesnt shown on my hosting site but it worked on Local
Post by: wvdkuil on January 04, 2022, 03:58:56 AM
Hello,

After I noticed that my OLD YrNo on my webpage is no longer functional I download your new script and to add MetNo instead.

First on my local web http://127.0.0.1 for example test it is working HOWEVER when I uploaded to my hosting site it only shows this (see attached image), I only changed the file names which are easy for me to remember inside folder where I put it but the scripts are still same intact.
http://www.pimohweather.com/YRNO.php
it supposed to be this (see the second image)
is there part on the script that dissallows to viewed on hosting site? please let me know.
regards
-Mike-

PLEASE always give a correct link to the real page with the error.
The link you supplied runs the forecast in a frame. So you waste support time to let me  scan the html to find the real forecast page used => http://www.pimohweather.com/WXYRMO/MetNo/wsMetNopage4.php

A 404 error comes from your webserver not from your website or scripts.

It simple tells you there is either a typing error in the pagename you typed
=> often capital letters and small letters really  are important on a website
==> http://www.pimohweather.com/WXYRMO/MetNo/wsMetNopage4.php   does not exist
The http://www.pimohweather.com/WXYRMO/MetNo/wsMetNoPage4.php  does exists,
=> it can find 3 other scripts
=> but fails as the wsMetNoHtml.php script is missing.

Why is it important for you to change script-names?
The  start-page from which you can easily test all scripts. can not find the script either
http://www.pimohweather.com/WXYRMO/MetNo/ clicking on the links, f.i. WU, will give a correct installation error
Clicking on the metno link will give the 404 error for http://www.pimohweather.com/WXYRMO/MetNo/wsFctMetnoPage4.php

That changing script names makes finding errors and giving support far more difficult than necessary.
And changing filenames without adapting the scripts which load the files is really not a good idea, to say it polite.

Wim
Title: Re: MetNo doesnt shown on my hosting site but it worked on Local
Post by: pimohdaimaoh on January 04, 2022, 11:00:27 AM
Hello,

After I noticed that my OLD YrNo on my webpage is no longer functional I download your new script and to add MetNo instead.

First on my local web http://127.0.0.1 for example test it is working HOWEVER when I uploaded to my hosting site it only shows this (see attached image), I only changed the file names which are easy for me to remember inside folder where I put it but the scripts are still same intact.
http://www.pimohweather.com/YRNO.php
it supposed to be this (see the second image)
is there part on the script that dissallows to viewed on hosting site? please let me know.
regards
-Mike-

PLEASE always give a correct link to the real page with the error.
The link you supplied runs the forecast in a frame. So you waste support time to let me  scan the html to find the real forecast page used => http://www.pimohweather.com/WXYRMO/MetNo/wsMetNopage4.php

A 404 error comes from your webserver not from your website or scripts.

It simple tells you there is either a typing error in the pagename you typed
=> often capital letters and small letters really  are important on a website
==> http://www.pimohweather.com/WXYRMO/MetNo/wsMetNopage4.php   does not exist
The http://www.pimohweather.com/WXYRMO/MetNo/wsMetNoPage4.php  does exists,
=> it can find 3 other scripts
=> but fails as the wsMetNoHtml.php script is missing.

Why is it important for you to change script-names?
The  start-page from which you can easily test all scripts. can not find the script either
http://www.pimohweather.com/WXYRMO/MetNo/ clicking on the links, f.i. WU, will give a correct installation error
Clicking on the metno link will give the 404 error for http://www.pimohweather.com/WXYRMO/MetNo/wsFctMetnoPage4.php

That changing script names makes finding errors and giving support far more difficult than necessary.
And changing filenames without adapting the scripts which load the files is really not a good idea, to say it polite.

Wim

Hi wvdkuil,

My apologies if I intentionally changes the file names, I did it intentionally the reason why I change the file-names because I like it to easily remember where I put it on my hosting site just to avoid unnecessary messing my uploads to web server if ever there will be need a troubleshoot just in case. Thank you for the response and Maybe I should revert back to its original filenames and retry to upload to the webserver, maybe that might be the reason of the error on web server.


UPDATE: it is now working, I didnt noticed that my web server is sensitive in small and symbol caps which I shouldnt change, but since the original file-names are difficult for me to remember I screen shot them one by one and save it to the same folder just in case I forgot the names when someday it needs to recall. Thank You for you reply

http://www.pimohweather.com/YRNO.php


Regards

-Mike-
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ghera on January 22, 2022, 10:07:32 AM
Hi,
I found some weird code inserted in forecast template, with links to freaky/ads/porn websites.
Here is an example:

":root topadblock, :root span[id^="ezoic-pub-ad-placeholder-"], :root img[alt^="f**kbook"], :root iframe[src*="mellowads.com"], :root div[style^="padding: 5px 15px !important"] > [style^="width: 100% !important; cursor: pointer !important;"], :root div[id^="zergnet-widget"], :root div[id^="traffective-ad-"], :root div[id^="taboola-stream-"], :root div[id^="sticky_ad_"], :root div[id^="rc-widget-"], :root div[id^="q1-adset-"], :root div[id^="proadszone-"], :root div[id^="lazyad-"], :root div[id^="gtm-ad-"], :root div[id^="ezoic-pub-ad-"], :root div[id^="dmRosAdWrapper"], :root div[id^="div-gpt-"], :root div[id^="div-adtech-ad-"], :root div[id^="dfp-slot-"], :root div[id^="dfp-ad-"], :root .......+ a long similar list + { display: none !important; }

What is this all about?
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 22, 2022, 12:06:37 PM
Hi,
I had the unpleasant surprise to find some weird code inserted in forecast template, with links to freaky/ads/porn websites.
Here is an example:

":root topadblock, :root span[id^="ezoic-pub-ad-placeholder-"], :root img[alt^="f**kbook"], :root iframe[src*="mellowads.com"], :root div[style^="padding: 5px 15px !important"] > [style^="width: 100% !important; cursor: pointer !important;"], :root div[id^="zergnet-widget"], :root div[id^="traffective-ad-"], :root div[id^="taboola-stream-"], :root div[id^="sticky_ad_"], :root div[id^="rc-widget-"], :root div[id^="q1-adset-"], :root div[id^="proadszone-"], :root div[id^="lazyad-"], :root div[id^="gtm-ad-"], :root div[id^="ezoic-pub-ad-"], :root div[id^="dmRosAdWrapper"], :root div[id^="div-gpt-"], :root div[id^="div-adtech-ad-"], :root div[id^="dfp-slot-"], :root div[id^="dfp-ad-"], :root .......+ a long similar list + { display: none !important; }

What is this all about?

Never seen this. The demo site does not has any of these in the html
Downloads untouched since 2021 March 3.

How did you obtain the scripts: Download from support site or from someone else?

What is the link to your site and to the forecast script?

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Daali on January 22, 2022, 12:13:46 PM
Hi,
I had the unpleasant surprise to find some weird code inserted in forecast template, with links to freaky/ads/porn websites.
Here is an example:

":root topadblock, :root span[id^="ezoic-pub-ad-placeholder-"], :root img[alt^="f**kbook"], :root iframe[src*="mellowads.com"], :root div[style^="padding: 5px 15px !important"] > [style^="width: 100% !important; cursor: pointer !important;"], :root div[id^="zergnet-widget"], :root div[id^="traffective-ad-"], :root div[id^="taboola-stream-"], :root div[id^="sticky_ad_"], :root div[id^="rc-widget-"], :root div[id^="q1-adset-"], :root div[id^="proadszone-"], :root div[id^="lazyad-"], :root div[id^="gtm-ad-"], :root div[id^="ezoic-pub-ad-"], :root div[id^="dmRosAdWrapper"], :root div[id^="div-gpt-"], :root div[id^="div-adtech-ad-"], :root div[id^="dfp-slot-"], :root div[id^="dfp-ad-"], :root .......+ a long similar list + { display: none !important; }

What is this all about?

Can we see the actual file and not the browser inspect code so we can determine if your browser has some malware or the source is corrupted?

Update:  you have AdBlocker Plugin installed.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ghera on January 22, 2022, 01:41:21 PM
I googled the suspect code and I found you are right, it was the ad-blocker. When disabled, the code went away. Thank you for your answer, everything's good! [tup] [tup] [tup] [tup] [tup]
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ghera on January 22, 2022, 04:21:20 PM
I have to be grateful for the man who worked on this wonder-weather-template, I have been searching for a replacement since yr.no let us down. Thank you, sir!

For two days I crawl to forum, and support, and answers, to really get how this work, and it works just fine. Perhaps I didn't understand exactly  ](*,) some things, some of them being talked over here before, so excuse me if I an redundant  ](*,), but I encounter some issue on METNO compact page.

For the "6 hours forecast" tab that I only want to use it shows the forecast starting the next day (+24 hours). For instance, now is saturday 11 pm, on this tab appears the sunday evening forecast. All the other tabs show saturday weather forecast. Is it how is supposed to be or did I do something wrong?

Also, is there a setting to fully show this page (100% height), without the slider?


Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 23, 2022, 05:34:37 AM
I have to be grateful for the man who worked on this wonder-weather-template, I have been searching for a replacement since yr.no let us down. Thank you, sir!

For two days I crawl to forum, and support, and answers, to really get how this work, and it works just fine. Perhaps I didn't understand exactly  ](*,) some things, some of them being talked over here before, so excuse me if I an redundant  ](*,), but I encounter some issue on METNO compact page.

For the "6 hours forecast" tab that I only want to use it shows the forecast starting the next day (+24 hours). For instance, now is saturday 11 pm, on this tab appears the sunday evening forecast. All the other tabs show saturday weather forecast. Is it how is supposed to be or did I do something wrong?

Also, is there a setting to fully show this page (100% height), without the slider?

Sadly all humans who try to give answers on this forum are not clairvoyant.

One needs a link  also called an URL to your website and the script to check what is causing your problems.
With that link one can inspect the HTML source, check the latitude / longitude used, inspect the returned data from met.no, and so on.
You were asked for that already two times  after your previous post.

You do not owe the author of the scripts anything, nor the other persons answering your questions.

To be honest, it is common courtesy to give that information needed when asked for by the people who spent their free time to help you solve your problems.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: cbnidk on January 23, 2022, 01:53:26 PM
Hi
After update my webserver to php 8.1.1 I got this error

Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /var/www/Apache_html/vejr/wsIncMetnoHtml4.php:554 Stack trace: #0 /var/www/Apache_html/vejr/wsIncMetnoHtml4.php(554): round() #1 /var/www/Apache_html/vejr/index.php(187): include_once('...') #2 {main} thrown in /var/www/Apache_html/vejr/wsIncMetnoHtml4.php on line 554

this is in line 554 :  {   $ws_dtl_html   .= PHP_EOL.'<td>'.round ($arr['clouds']).' %</td>';}

wsIncMetnoHtml4.php
can someone help to get i working with php 8

cbni
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 23, 2022, 03:42:51 PM
Hi
After update my webserver to php 8.1.1 I got this error

Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /var/www/Apache_html/vejr/wsIncMetnoHtml4.php:554 Stack trace: #0 /var/www/Apache_html/vejr/wsIncMetnoHtml4.php(554): round() #1 /var/www/Apache_html/vejr/index.php(187): include_once('...') #2 {main} thrown in /var/www/Apache_html/vejr/wsIncMetnoHtml4.php on line 554

this is in line 554 :  {   $ws_dtl_html   .= PHP_EOL.'<td>'.round ($arr['clouds']).' %</td>';}

wsIncMetnoHtml4.php
can someone help to get i working with php 8

cbni

Seems that the scripts need to be checked again for 8.1.1 problems.

This error-line should read:
Code: [Select]
            {   $ws_dtl_html   .= PHP_EOL.'<td>'.round ( (int) $arr['clouds']).' %</td>';}
But in the "latest" download version that that is line 551

Strange?

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ghera on January 24, 2022, 04:53:07 AM
I have to be grateful for the man who worked on this wonder-weather-template, I have been searching for a replacement since yr.no let us down. Thank you, sir!

For two days I crawl to forum, and support, and answers, to really get how this work, and it works just fine. Perhaps I didn't understand exactly  ](*,) some things, some of them being talked over here before, so excuse me if I an redundant  ](*,), but I encounter some issue on METNO compact page.

For the "6 hours forecast" tab that I only want to use it shows the forecast starting the next day (+24 hours). For instance, now is saturday 11 pm, on this tab appears the sunday evening forecast. All the other tabs show saturday weather forecast. Is it how is supposed to be or did I do something wrong?

Also, is there a setting to fully show this page (100% height), without the slider?

Sadly all humans who try to give answers on this forum are not clairvoyant.

One needs a link  also called an URL to your website and the script to check what is causing your problems.
With that link one can inspect the HTML source, check the latitude / longitude used, inspect the returned data from met.no, and so on.
You were asked for that already two times  after your previous post.

You do not owe the author of the scripts anything, nor the other persons answering your questions.

To be honest, it is common courtesy to give that information needed when asked for by the people who spent their free time to help you solve your problems.

I think it should be useful to mention in the firt post of this thread, for those who have issues, to mandatory include a link to the page with problems.

Well, the problem seems to be gone (weather forecast shown starting + 24 h). Perhaps I changed some data in parameters page, that was saved in cache. Today everything goes well  :grin:

Could you help on the second issue, with the slider - removing slider on forecast 6 hours page, because the browser/smartphone has it's own slider -  in order to show 100% page height? Could that be possible? This has nothing to do with a certain personal page, but with the general script
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 24, 2022, 04:56:35 AM

I think it should be useful to mention in the firt post of this thread, for those who have issues, to mandatory include a link to the page with problems.

Well, the problem seems to be gone (weather forecast shown starting + 24 h). Perhaps I changed some data in parameters page, that was saved in cache. Today everything goes well  :grin:

Could you help on the second issue, with the slider - removing slider on forecast 6 hours page, because the browser/smartphone has it's own slider -  in order to show 100% page height? Could that be possible? This has nothing to do with a certain personal page, but with the general script

The moment I see a correct URL, I will check what is happening.

In your first post you insinuated that the scripts were inserting links to porno.
Quote
I had the unpleasant surprise to find some weird code inserted in forecast template, with links to freaky/ads/porn websites.
Here is an example:
...
What is this all about?

Without testing the demo site and without remembering you installed malware yourself.
If you want support from the author of these scripts, you either include correct links, or wait forever.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: cbnidk on January 24, 2022, 11:20:02 AM
Hi
After update my webserver to php 8.1.1 I got this error

Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /var/www/Apache_html/vejr/wsIncMetnoHtml4.php:554 Stack trace: #0 /var/www/Apache_html/vejr/wsIncMetnoHtml4.php(554): round() #1 /var/www/Apache_html/vejr/index.php(187): include_once('...') #2 {main} thrown in /var/www/Apache_html/vejr/wsIncMetnoHtml4.php on line 554

this is in line 554 :  {   $ws_dtl_html   .= PHP_EOL.'<td>'.round ($arr['clouds']).' %</td>';}

wsIncMetnoHtml4.php
can someone help to get i working with php 8

cbni

Seems that the scripts need to be checked again for 8.1.1 problems.

This error-line should read:
Code: [Select]
            {   $ws_dtl_html   .= PHP_EOL.'<td>'.round ( (int) $arr['clouds']).' %</td>';}
But in the "latest" download version that that is line 551

Strange?

Wim

Hi Win
line 554 is because I have put this in at first           error_reporting(E_ERROR | E_WARNING | E_PARSE);
there is a lot of warning

when I make the change you suggested it work again Thank you  [tup]

I have to change 2 line 554 and 648   by me -3 line in the last script

{   $ws_dtl_html   .= PHP_EOL.'<td>'.round ( (int) $arr['clouds']).' %</td>';}

{   $ws_tbl_html   .= PHP_EOL.'<td>'.round ( (int) $arr['clouds']).' %</td>';}

cbni
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ghera on January 27, 2022, 02:21:37 PM

I think it should be useful to mention in the firt post of this thread, for those who have issues, to mandatory include a link to the page with problems.

Well, the problem seems to be gone (weather forecast shown starting + 24 h). Perhaps I changed some data in parameters page, that was saved in cache. Today everything goes well  :grin:

Could you help on the second issue, with the slider - removing slider on forecast 6 hours page, because the browser/smartphone has it's own slider -  in order to show 100% page height? Could that be possible? This has nothing to do with a certain personal page, but with the general script

The moment I see a correct URL, I will check what is happening.

In your first post you insinuated that the scripts were inserting links to porno.
Quote
I had the unpleasant surprise to find some weird code inserted in forecast template, with links to freaky/ads/porn websites.
Here is an example:
...
What is this all about?

Without testing the demo site and without remembering you installed malware yourself.
If you want support from the author of these scripts, you either include correct links, or wait forever.

Wim


I have to really appologize for my post with the "insinuation". It wasn't my intention to bring a shadow to someone's very good intentions and hard work. I come with the bad experience of a hacked website, where I installed some scripts that contained malware and it took a lot of work to clean the mess. So, I feared of history repeating.

This was surely not the case, it was my fault that I didn't googled the suspected text before  ](*,) I posted, to find out that it was my browser ad-block doing that. Please, accept my appologies.  :???:

In my previous post I asked about removing the slider, I found out a setting and resolved that.

It remains the other problem that I see, it is about a day repeating in the table - please see the attachment.

I followed this issue for more days and here is what I found: during the morning and the day, everything is ok. In the evening, when there are only two intervals left, the name of the day changes with the name of the next day, although the weather data is ok.

Here is the link: https://www.gherlanews.ro/wsfct4/wsFctMetnoSmall4.php
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 27, 2022, 03:34:38 PM
. . . shortened
It remains the other problem that I see, it is about a day repeating in the table - please see the attachment.

I followed this issue for more days and here is what I found: during the morning and the day, everything is ok. In the evening, when there are only two intervals left, the name of the day changes with the name of the next day, although the weather data is ok.
. . .

Problem confirmed. The demo site has the same problem https://www.weerstation-herent.be/wsfct4/wsFctMetnoSmall4.php

The unix time in the first 6-hr forecast  is already in the next day. In your case 02:00 in the night.
Normally the new day-data is calculated when the morning 6-hr part is read.

Script wsIncMetnoHtml4.php line 610. That line reads now
Code: [Select]
        $ws_tbl_html   .= ws_fct_dateline ($arr['intdate'], 'mtb_head', $ws_table_cols);change to
Code: [Select]
        if ($arr['part'] <> 'M' ) {$time = $arr['intdate'] - 12*3600;} else {$time = $arr['intdate'];}
        $ws_tbl_html   .= ws_fct_dateline ($time, 'mtb_head', $ws_table_cols);

Seems to work OK now,

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ghera on January 27, 2022, 04:15:50 PM
Thank you for the very fast answer and solution.

I made the change, now the day name is ok in the "Forecast 6 hours interval", although the next day (Friday) starts at 8 in the morning.

Now the problem moved to the next tab, "Forecast details", where is appears Friday for the last hour of Thursday.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 28, 2022, 04:22:57 AM
Thank you for the very fast answer and solution.
I made the change, now the day name is ok in the "Forecast 6 hours interval", although the next day (Friday) starts at 8 in the morning.

After tedious discussions, the beta users of the scripts decided to start the "day" with the "morning" part.
Normally the visitors of websites assume that the  "night"-part is the last part of the day, not the first part of a new day.
That is programmed that way in the Forecast tab (shows two columns / 24 hour = daylight-time and night-time) and the Forecast-6-hour-parts with 2 rows  daylight-time and 2 rows night-time.

The graph-tab and the details-tab use 1 hour forecasts and show the day from 00-24.
The shading  in graphs and colorising in the details-list use the "more precise"  sunrise-sunset times for the day.
Quote
Now the problem moved to the next tab, "Forecast details", where is appears Friday for the last hour of Thursday.

Similar problem as with the 6-hour parts.
Will look into this later today.

Wim

P.S. Do we use 23:00 => 23:59   or 23:01 => 24:00 ?
To add to the confusion, the hourly met-no data  show the temp-data at the end of the hour (point forecast) , rain, icon a.s.o. for the whole hour ending with that timestamp (period forecast).
The hourly forecast with 00:00 timestamp seems to contain the data for 23:00 => 23:59 and the temp at  00:00
And naturally, the contents and logic of the date/times has changed between metno API 1.8, 1.9 and 2.0 .
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ghera on January 28, 2022, 12:42:55 PM
I have to be tedious, too, perhaps a little late, but it is for the first time that I hear a day (a date in calendar) begins in the morning, because some internet travellers wake up in the morning and they consider that unique moment the start of their day. Perhaps daylight begins in the morning, that is another thing. Maybe some people who work at night and sleep the day might want the day to begin at 7 PM.

Watching the weather table, it appears that until morning, is still yesterday, and that is not right. Simply look at any clock, calendar, smartphone, smartwatch in this world: after 00:00, is today. This can't be changed, and has nothing to do with people waking up and start surfing the internet.

There was also a mention about the sunrise image in the table being connected to the start of the day (morning). But if so, the sunset image, next to sunrise, is connected to...? I see no connection here.

Met.no, that seems one of the last free services to work flawless, starts the day at midnight, and this is normal. The same for any official daily weather web service that respects itself, like Google, Yahoo, AccuWeather, WeatherUnderground and so on.

Of course I have no right to ask for changes that would bring my understanding of normality, because this is a volunteer act that I truly appreciate (I also want to donate when I have a final form, the man who worked on this has to be rewarded for his master work). This script is the top for services it offers and is it the best one I found after months of research. But, for an accurate information of the public in the whole wide world, it needs a simple but complicated thing: to be perfect.

Thank you and sorry if I upset anyone, it's just a point of view.
Title: Yrno -->> Metno
Post by: MarkDM on February 19, 2022, 01:52:32 PM
I want to replace the yrno-script by a metno-script in my Leuven-template website.
Is this somewhere documented ? It is not working for me, I have not much knowledge of php etc.
https://weerstationberlare.be/index.php?mobi=11 (https://weerstationberlare.be/index.php?mobi=11)

What have I done yet:
How can I do more debugging ?
Thank you for any help.
Title: Re: Yrno -->> Metno
Post by: wvdkuil on February 20, 2022, 03:23:00 AM
I want to replace the yrno-script by a metno-script in my Leuven-template website.
Is this somewhere documented ? It is not working for me, I have not much knowledge of php etc.
https://weerstationberlare.be/index.php?mobi=11 (https://weerstationberlare.be/index.php?mobi=11)

What have I done yet:
  • I copied the file _metric_settings.php to the map /mobi and customised it. Is this last necessary in a Leuven Leuven-template site ?
  • I copied the file wsFctMetnoSmall4.php to the map /mobi and customised it. I changed the setting "$needs_html     = false;"
  • In the file mobi.php I modified the call to the yrno-script.
    Quote
    #
    # page mobi = 11 - forecast  -----------------------------------
    #
    elseif ($mobi == 11) {
            include('wsFctMetnoSmall4.php');
            }
    #
How can I do more debugging ?
Thank you for any help.

This is not a forecast problem.   Check https://support.leuven-template.eu/
This should have been posted in the Leuven Template topic: https://www.wxforum.net/index.php?topic=36504.0
The forecast scripts as used in the Leuven-Template are different from the stand-alone scripts.

The Template is EOL and is not actively supported anymore.
The "mobile-phone" page is not that often used either nowadays.
The small phones from a "long in IT" time ago,  currently have large screens.

Better remove the use of that "mobi" page from your menu
or
remove the forecast from the "mobi" menu.


Title: "Leuven" Forecast scripts latest version available for PHP 8.1
Post by: wvdkuil on February 20, 2022, 11:47:39 AM
Leuven forecast scripts are adapted for PHP 8.1.1

The demo and download  for this updated version 4.11 are online at

https://www.weerstation-herent.be/wsfct4/   running  PHP  7.4.27

https://pwswd.be/wsfct4/  running  PHP 8.1.1.

Both sites are identical, only the web-server PHP is different.
If you have a problem please always test the demo sites.
Use the version similar to your own installation so that I can check the error-logs.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: MarkDM on February 21, 2022, 12:49:13 PM
I found this page of donators:
https://support.leuven-template.eu/userlistScripts.php (https://support.leuven-template.eu/userlistScripts.php)
How can I get on this list ? How to make a donation for the use of the scripts ?
Regards,
Mark
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on February 21, 2022, 01:06:47 PM
I found this page of donators:
https://support.leuven-template.eu/userlistScripts.php (https://support.leuven-template.eu/userlistScripts.php)
How can I get on this list ? How to make a donation for the use of the scripts ?
Regards,
Mark

All information is on https://support.leuven-template.eu/
Quote
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
If I helped you building and enhancing your website, feel free to donate at  . .link . . .
When you click on the link you can "send" a donation where there is ample room to type whatever reason you have to donate, f.i. Leuven-Template  or Purpleair-script

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Gert Woerden on March 13, 2022, 05:50:48 PM
hi Wim
I have install your script  and it is working almost ok
I have some problem with the wxsim   script
https://www.weerstation-woerden.nl/wx_lvn_wxsimD.php
after WXsim run for the update   and upload it into the Root  of the server   i see always a error  on top of the script
don't know if this is a Pad problem
I see this

The WXSIM forecast ../../plaintext.txt is not currently available.

Notice: Undefined variable: WXSIMday in /home/xxxxx/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPCreate.php on line 77

Warning: count(): Parameter must be an array or an object that implements Countable in /home/xxxxx/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPCreate.php on line 77

Notice: Undefined offset: 0 in /home/xxxxx/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPHtml4.php on line 255

Notice: Trying to access array offset on value of type null in /home/deb57018/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPHtml4.php on line 255

hope someone know this problem and know the fix
greetings   Gert
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 14, 2022, 04:52:19 AM
. . .don't know if this is a Pad problem
I see this

The WXSIM forecast ../../plaintext.txt is not currently available.

Notice: Undefined variable: WXSIMday in /home/xxxxx/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPCreate.php on line 77

Warning: count(): Parameter must be an array or an object that implements Countable in /home/xxxxx/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPCreate.php on line 77

Notice: Undefined offset: 0 in /home/xxxxx/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPHtml4.php on line 255

Notice: Trying to access array offset on value of type null in /home/deb57018/domains/weerstation-woerden.nl/public_html/wsfct4/wsIncWxsimPHtml4.php on line 255
. . .

Yes, This is a path problem.
The errors signals the the plaintext file is not found, therefor some of the tabs are empty.

First I have to test if all is well in "stand-alone" mode.
https://www.weerstation-woerden.nl/wsfct4/wsFctWxsimDPage.php 
That fails => PHP 500 error
There are change(s) in the scripts itself which prohibit to run it correctly  F.i. line 176 in   originally read:
Code: [Select]
$ws_script_dir  = './'; but is changed to
Code: [Select]
$ws_script_dir  = './wsfct4'; and is missing the / at the end
Code: [Select]
$ws_script_dir  = './wsfct4/';
Resetting it back to ./ will make the page appear correctly in stand-alone mode.
Then we we can see if all files are found.

=== Your website
I am confused where the error message comes from
The WXSIM forecast ../../plaintext.txt[/b][/color] is not currently available.
It is correctly set in the start-script for saratoga templates
==> wx_lvn_wxsimD.php as pointing to ./
No idea where that is reset to  ../../

As I have no functioning Saratoga website  anymore, I can not really help you further.

Wim





Title: Re: Support of the "Leuven" Forecast scripts
Post by: Gert Woerden on March 14, 2022, 02:39:33 PM
Thanks for the help Wim
For now  the page https://www.weerstation-woerden.nl/wsfct4/wsFctWxsimDPage.php  works ok 
but still have that problem  with the https://www.weerstation-woerden.nl/wx_lvn_wxsimD.php  page 
yes I know that very strange
I see  if I reload the page wsfct4/wsFctWxsimDPage.php  that the cache folder into the wsfct4  folder  update with some files
if Ireload the wx_lvn_wxsimD.php  page   i see no update into the cache folder   wsfct4   and into the root


greetings  Gert 
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 15, 2022, 07:22:15 AM
Thanks for the help Wim
For now  the page https://www.weerstation-woerden.nl/wsfct4/wsFctWxsimDPage.php  works ok 
but still have that problem  with the https://www.weerstation-woerden.nl/wx_lvn_wxsimD.php  page 
yes I know that very strange
I see  if I reload the page wsfct4/wsFctWxsimDPage.php  that the cache folder into the wsfct4  folder  update with some files
if Ireload the wx_lvn_wxsimD.php  page   i see no update into the cache folder   wsfct4   and into the root

greetings  Gert

As said, took a tad longer as I had to re-install a Saratoga test site. Then I copied  your WXSIM data-files and could test.
The scripts work well on my Saratoga-Template test-site, both in stand-alone as in the template pages.
See attached screenshot, running without code-changes in the scripts.

When having that test-site I could locate that error message. It is not coming from a Leuven-stand-alone script. You are using a Saratoga template and the plaintext.txt file is processed with the original PlainText parser for the Saratoga template.

In your website, that "modified" plaintext parser has a setup error which prints the warning-message.
               The WXSIM forecast ../../plaintext.txt is not currently available.
You can check that yourself  https://www.weerstation-woerden.nl/plaintext-parser.php
The "modification" is in line 132
Code: [Select]
$plaintextFile = '../../plaintext.txt';  ######     // location of the WXSIM plaintext.txtIMHO for a Saratoga-Template installed in the root, it should read
Code: [Select]
$plaintextFile = './plaintext.txt';       // location of the WXSIM plaintext.txt
After changing that line you should test and that error should be gone. Use this URL
https://www.weerstation-woerden.nl/wx_lvn_wxsimD.php?debug&force=wxsim

Wim

Loyal users of the Leuven scripts can be found here (https://support.leuven-template.eu/userlistScripts.php) and here (https://support.leuven-template.eu/userlist.php)

Title: Re: Support of the "Leuven" Forecast scripts
Post by: Gert Woerden on March 15, 2022, 12:32:56 PM
hi Wim
yes its works now 100%
never look into the plaintext-parser.php for the path  oeps   !!!
thanks for your help 
Greetings    Gert
Title: Re: Support of the "Leuven" Forecast scripts
Post by: djroby19 on March 17, 2022, 01:44:41 PM
Good evening Wim from today on Metno forecasts this problem comes out,
What could it be?   :roll: :roll:

Notice: Undefined index: symbol_url in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 409

Notice: Undefined index: desc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 412

Notice: Undefined index: precip_clc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 417

Notice: Undefined index: symbol_url in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 622

Notice: Undefined index: desc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 624

Notice: Undefined index: precip_clc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 628

Notice: Undefined index: symbol_lnk in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 704

Notice: Undefined index: precip_clc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 711

Link e questo  https://www.pomeziameteo.it/prev_Metno.php
Title: Re: Support of the "Leuven" Forecast scripts
Post by: djroby19 on March 17, 2022, 03:43:09 PM
Everything back in place was their problem
sorry Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Fabrice on March 24, 2022, 01:38:45 PM
Good evening Wim from today on Metno forecasts this problem comes out,
What could it be?   :roll: :roll:

Notice: Undefined index: symbol_url in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 409

Notice: Undefined index: desc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 412

Notice: Undefined index: precip_clc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 417

Notice: Undefined index: symbol_url in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 622

Notice: Undefined index: desc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 624

Notice: Undefined index: precip_clc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 628

Notice: Undefined index: symbol_lnk in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 704

Notice: Undefined index: precip_clc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 711

Link e questo  https://www.pomeziameteo.it/prev_Metno.php

Hello. I had a problem a few days ago too.
Every evening during the 1-7 p.m. period and around 6 p.m., these error messages appear.
Then it works normally again and the errors are again present around 11 p.m.
Also, the current weather icon disappears as shown in my image.

how to solve this specific problem that I found on other weather sites.

errors : https://www.photos.lejma.fr/ws/forecast.jpg



Notice: Undefined index: symbol_url in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 409

Notice: Undefined index: desc in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 412

Notice: Undefined index: precip_clc in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 417

Notice: Undefined index: symbol_url in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 622

Notice: Undefined index: desc in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 624

Notice: Undefined index: precip_clc in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 628

Notice: Undefined index: symbol_lnk in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 704

Notice: Undefined index: precip_clc in /home/lejma/photos.lejma.fr/ws/wsIncMetnoHtml4.php on line 711

 [ You are not allowed to view attachments ]
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 25, 2022, 03:55:46 AM
I am off the grid until Monday, no computer no keyboard, phone only.
It has to wait.

But you should use your cPanel to switch off error reporting as a production website should not display notices.

Those messages are not errors, not even warnings. Notices are low priority messages to the script writer to take action.
 The problem seems to be an incomplete first day part of the day, but only occurring on certain hours?

Wim

Title: Re: Support of the "Leuven" Forecast scripts
Post by: djroby19 on March 25, 2022, 02:56:12 PM
Yes only at certain times and it does this on your demo too
https://www.weerstation-herent.be/wsfct4/

By my control panel, do you mean my Aruba host?
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 27, 2022, 07:32:12 AM
Good evening Wim from today on Metno forecasts this problem comes out,
What could it be?   :roll: :roll:
Notice: Undefined index: symbol_url in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 409
Notice: Undefined index: desc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 412
Notice: Undefined index: precip_clc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 417
Notice: Undefined index: symbol_url in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 622
Notice: Undefined index: desc in /web/htdocs/www.pomeziameteo.it/home/wsfct4/wsIncMetnoHtml4.php on line 624

. . . . . . shortened
Link e questo  https://www.pomeziameteo.it/prev_Metno.php
Hello. I had a problem a few days ago too.
Every evening during the 1-7 p.m. period and around 6 p.m., these error messages appear.
Then it works normally again and the errors are again present around 11 p.m.
Also, the current weather icon disappears as shown in my image.
. . . shortened

There are two problems.
1. The (xml) data seems to be incomplete (but not invalid) some parts of a 24-hr day day
==> add extra code to wsIncMetnoHtml4.php  to skip incomplete day-parts

2. The error messages should not appear in a production environement
==>  :oops:  sorry I left a debug statement in ws_set_environment.php on the first line

Both updated scripts are attached and can be tested.
I will post a new download a.s.a.p.

Also please check your _metric_settings.php 
On line 12 it could read
Code: [Select]
$ws_errors      = true; # false when ready testing After testing you better change that to
Code: [Select]
$ws_errors      = false; # false when ready testing
Wim
Title: Setting the station number in _ca_settings.php for Canada
Post by: garydumbleton on March 29, 2022, 08:56:52 AM
Hello,

I was wondering if anyone knows how to get the $yourEcArea number to put into the _ca_settings.php file. I am not able to see where the file is.  I do see that there is a 3 digit number that can be used.  Here is the  line in the file    $yourEcArea     = "s0000646"; #<name code="s0000646" lat="42.30N" lon="82.99W">Windsor</name>

I am not sure where to get the number from.

I did do a search of this forum and did not come up with anything.  The weather is currently set for Windsor, ON and I need it to be Brantford, ON weather. There is quite a difference from Windsor to Brantford in weather.

If someone could shed some light on this I would be greatful.

The scripts that you have provided have been really great.  I am currently using the wxsim script now and wanted to put the Environment Canada one on to for comparison.

Thanks
Gary
Title: Re: Setting the station number in _ca_settings.php for Canada
Post by: wvdkuil on March 29, 2022, 09:08:30 AM
Hello,

I was wondering if anyone knows how to get the $yourEcArea number to put into the _ca_settings.php file. I am not able to see where the file is.  I do see that there is a 3 digit number that can be used.  Here is the  line in the file    $yourEcArea     = "s0000646"; #<name code="s0000646" lat="42.30N" lon="82.99W">Windsor</name>

I am not sure where to get the number from.

I did do a search of this forum and did not come up with anything.  The weather is currently set for Windsor, ON and I need it to be Brantford, ON weather. There is quite a difference from Windsor to Brantford in weather.

If someone could shed some light on this I would be greatful.

The scripts that you have provided have been really great.  I am currently using the wxsim script now and wanted to put the Environment Canada one on to for comparison.

Thanks
Gary

Hi Gary,

Thanks for your positive feedback.

The list with area codes is from EC at http://dd.weather.gc.ca/citypage_weather/docs/site_list_en.csv

Brantford seems to be s0000550,Brantford,ON,43.16N,80.26W

Success,

Wim

Title: Re: Support of the "Leuven" Forecast scripts
Post by: garydumbleton on March 29, 2022, 10:11:49 AM
Thanks Wim,

I did not even know that that spreadsheet existed.

Have a good day.

Gary
Title: how to setup the file Prediction scenarios of version 4 wsfct4.
Post by: Giwrgos22 on April 14, 2022, 02:59:26 AM
I have downloaded the version 4 forecast scripts https://www.weerstation-herent.be/wsfct4/ now how do I install them What are the steps?
Title: Re: how to setup the Leuven forecast scripts (wsfct4).
Post by: wvdkuil on April 14, 2022, 05:06:14 AM
I have downloaded the version 4 forecast scripts https://www.weerstation-herent.be/wsfct4/ now how do I install them What are the steps?

Hi Giwrgos22,

The "official" support topic for this set of scripts is at https://www.wxforum.net/index.php?topic=36478

Also you will get better answers if you post the link to your website where you want to use these scripts..

ToDo: You install the wsfct4 scripts on your website, better use the same folder name.
Type in your browser . . .your website . ./ wsfct4/
and the same "Readme" will open as in https://www.weerstation-herent.be/wsfct4/ 
The bottom link is labelled  (https://www.weerstation-herent.be/wsfct4/readme.html)Readme
In your case it should go to your own readme . . .your website . ./ wsfct4/readme.html

Clicking that will display all settings, in the first tab,  either for Metric users, such as for Greece, US (with miles, inches  and other date-formats en Canadian users.
You need to edit the metric settings one by one in the file  . . .your website . ./ wsfct4/_metric_settings.php
Use a decent script editor such as notepad++ (https://notepad-plus-plus.org/)  for windows or BBedit (https://www.barebones.com/products/textwrangler/) on a Mac. Do not use notepad.exe or ms-word it will kill your UTF-8 scipts.

There is a screenshot, second tab,  in the readme explaining the different parts of a forecast page.

Then a page explaining the settings for one forecast-company, the example uses met.no but other ones are similar.

After customising the general settings in _metric_settings.php  and the page settings in f.i.
==> first test the forecast page in stand-alone mode f.i.  . . .your website . ./ wsfct4/wsFctMetnoPage4.php

After the stand-alone version works OK, you have to decide how to integrate a forecast page into your website.

WARNING: If you have no knowledge of or experience with  PHP and editing scripts you should use other solutions and delete these scripts

Succes, Wim

@MODERATOR May someone can move this question to topic=36478
Merged to topic 36478 as requested :)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: andro700 on April 18, 2022, 12:44:28 PM
On all pages of my WXSIM forecast pages I am getting a warning,
Warning: Undefined array key "dateOnlyFormat" in /home/goblesweather/www/www/_us_settings.php on line 195 (http://Warning: Undefined array key "dateOnlyFormat" in /home/goblesweather/www/www/_us_settings.php on line 195)

Here is a link to one of the pages, https://goblesweather.com/wx_lvn_wxsimD.php (https://goblesweather.com/wx_lvn_wxsimD.php)

Here is line 195 of the _us_settings.php script,
Quote
$dateOnlyFormat   = $SITE['dateOnlyFormat'];

I am using the latest scripts as well.

Chuck
Title: Re: Support of the "Leuven" Forecast scripts
Post by: saratogaWX on April 18, 2022, 01:34:29 PM
You may have an older Settings.php template .. the $SITE['dateOnlyFormat'] should have been in your Settings.php Saratoga template file.

Code: [Select]
$SITE['timeOnlyFormat'] = 'g:ia';          // USA format h:mm[am|pm\
//$SITE['timeOnlyFormat'] = 'H:i';          // Euro format hh:mm  (hh=00..23);
$SITE['dateOnlyFormat'] = 'd-M-Y';        // for 31-Mar-2008 or 'j/n/Y' for Euro format
in Settings.php for USA templates.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: andro700 on April 19, 2022, 01:02:11 PM
My Settings.php is the current version and is

Code: [Select]
$SITE['timeFormat'] = 'D, d-M-Y g:ia T';  // Day, 31-Mar-2006 6:35pm Tz  (USA Style)
//$SITE['timeFormat'] = 'm/d/Y g:ia';      // USA  format 03/31/2006 14:03
//$SITE['timeFormat'] = 'd/m/Y H:i';       // Euro format 31/03/2006 14:03
//$SITE['timeFormat'] = 'Y-m-d H:i';       // ISO  format 2006-03-31 14:03

$SITE['timeOnlyFormat'] = 'g:ia';          // USA format h:mm[am|pm\
//$SITE['timeOnlyFormat'] = 'H:i';          // Euro format hh:mm  (hh=00..23);
//$SITE['dateOnlyFormat'] = 'd-M-Y';        // for 31-Mar-2008 or 'j/n/Y' for Euro format
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on April 19, 2022, 01:26:54 PM
My Settings.php is the current version and is

Code: [Select]
$SITE['timeFormat'] = 'D, d-M-Y g:ia T';  // Day, 31-Mar-2006 6:35pm Tz  (USA Style)
//$SITE['timeFormat'] = 'm/d/Y g:ia';      // USA  format 03/31/2006 14:03
//$SITE['timeFormat'] = 'd/m/Y H:i';       // Euro format 31/03/2006 14:03
//$SITE['timeFormat'] = 'Y-m-d H:i';       // ISO  format 2006-03-31 14:03

$SITE['timeOnlyFormat'] = 'g:ia';          // USA format h:mm[am|pm\
//$SITE['timeOnlyFormat'] = 'H:i';          // Euro format hh:mm  (hh=00..23);
//$SITE['dateOnlyFormat'] = 'd-M-Y';        // for 31-Mar-2008 or 'j/n/Y' for Euro format
The two // should be removed from the last line. Those  // makes that line a comment. It should look like this
Code: [Select]
$SITE['dateOnlyFormat'] = 'd-M-Y';        // for 31-Mar-2008 or 'j/n/Y' for Euro format
Succes,
Wim
Title: Re: Support of the &quot;Leuven&quot; Forecast scripts
Post by: andro700 on April 19, 2022, 03:48:40 PM
Made the change and the error went away. Pages are all gods.

Thanks,
Chuck


Sent from my iPhone using Tapatalk
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Weerstation on April 27, 2023, 04:19:03 AM
Hi,

I am using the forecast in my saratoga template.
Unfortunately, the graph won't load anymore since a couple of days.
I noticed my php version changed to 8.1.17 (was 8.1.16) maybe that's why.

Forecast (https://www.westland-depoel.nl/vantagevue/ws/wx_lvn_metno.php)

TIA

Title: Re: Support of the "Leuven" Forecast scripts
Post by: Fabrice on April 27, 2023, 06:54:17 AM
Good morning.
Since yesterday, I have the same display problem. I specify that my php version is 7.4 and I have not modified it. Where can this come from ?. THANKS.




Hi,

I am using the forecast in my saratoga template.
Unfortunately, the graph won't load anymore since a couple of days.
I noticed my php version changed to 8.1.17 (was 8.1.16) maybe that's why.

Forecast (https://www.westland-depoel.nl/vantagevue/ws/wx_lvn_metno.php)

TIA
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Weerstation on April 27, 2023, 07:39:08 AM
No problem at the moment.
Working again.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on April 27, 2023, 08:02:03 AM
The cause of the problems:  New version 11.0.0 of Highcharts.

Basic solutions:
1. Change in 1 line from Highcharts.chart  to Highcharts.Chart
2. use the previous version of Highcharts => https://github.com/poblabs/weewx-belchertown/issues/881
3. Wait a few days if Highcharts will release an update for this "problem".

Be aware that the new 11.0.0 version has a lot of small changes which mess up the graph also.

Wim
 
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on April 28, 2023, 07:03:26 AM
The demo site https://pwswd.be/wsfct4/  and the full download are refreshed on 2023-04-28 2023-05-03

The readme and explain pages are adapted for the DarkSky EOL.

The new version 11-0-0 of HighCharts affected three scripts wsIncNoaaDHtml4.php wsIncMetnoHtml4.php and wsIncHwaHtml4.php
For those users which are up-to-date with the scripts, I attach a zip with the three scripts.

Succes,
Wim

2023-05-03 Attachment (15 downloads) removed, latest version topic https://www.wxforum.net/index.php?topic=36478.msg459783;topicseen#msg459783
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Weerstation on April 29, 2023, 11:32:34 AM
Thanks Wim.

I will donate later on for the forecasts updates.

My days are a bit off underneath the graph.
I recall this was the case also in the previous version.
Is there a way to fix this.

My Forecast (https://www.westland-depoel.nl/vantagevue/ws/wx_lvn_metno.php)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on April 29, 2023, 11:54:59 AM
. . .
My days are a bit off underneath the graph.
I recall this was the case also in the previous version.
This is one of the numerous very small changes, also the thick lines, non-curved graphs a.s.o.
I will adapt the code but only when the release is two weeks old.
I expect this 0.0 release to be upgraded shortly as is the case with "all" 0.0 releases of scripts.
Quote
Is there a way to fix this.
Yes, go to the previous release as described on the weewx-belchertown github pages.

Wim van der Kuil
Leuven script supporters (https://support.leuven-template.eu/userlistScripts.php)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 on April 30, 2023, 10:11:53 PM
Could you please substitute English for the Dutch words as shown in the screenshot.

 [ You are not allowed to view attachments ]

Thanks
Keith
Title: Re: Support of the "Leuven" Forecast scripts
Post by: andro700 on May 01, 2023, 12:02:22 AM
My page below is generating a deprecated error.  I am running PHP 8.2.1.

https://www.goblesweather.com/wx_lvn_wxsimD.php (https://www.goblesweather.com/wx_lvn_wxsimD.php)

Here is the error.

Deprecated: Function utf8_decode() is deprecated in /home/goblesweather/www/www/wsIncWxsimDHtml4.php on line 815

Thanks,
Chuck
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on May 01, 2023, 02:36:04 AM
My page below is generating a deprecated error.  I am running PHP 8.2.1.

https://www.goblesweather.com/wx_lvn_wxsimD.php (https://www.goblesweather.com/wx_lvn_wxsimD.php)

Here is the error.

Deprecated: Function utf8_decode() is deprecated in /home/goblesweather/www/www/wsIncWxsimDHtml4.php on line 815

Thanks,
Chuck

@ALL  Deprecated message
That is not an error it is just a message that the used function or construct will not be supported in the future.
Normal production websites do not show these messages to the visitors as it does not affect the shown information.

There is a real "error" though,  I left some debugging code in line 1 of ws_set_environment.php  :oops:
https://www.goblesweather.com/ws_set_environment.php?sce=view
That first line makes sure  that "E_ALL" messages are printed.
Change that line by adding a comment mark # before ini_set
Code: [Select]
<?php  # ini_set(&#39;display_errors&#39;, &#39;On&#39;); error_reporting(E_ALL); $ws_lang_missing = $ws_errors = $wsDebug  = true; #echo &#39;<!-- debug on -->&#39;.PHP_EOL;
Thank you for using the Leuven Forecast scripts.
Wim van der Kuil
Leuven script supporters (https://support.leuven-template.eu/userlistScripts.php)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil 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 (https://support.leuven-template.eu/userlistScripts.php)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 on May 01, 2023, 04:11:12 AM
Thank you for your prompt reply to my request for help. Fixed.

Keith
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil 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 (https://support.leuven-template.eu/userlistScripts.php)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: kyomar on May 08, 2023, 08:26:43 PM
Wim, many thanks for the updated scripts - greatly appreciated. It's working great.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Dador 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. :???:
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil 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.

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

Succes,
Wim


Title: Re: Support of the "Leuven" Forecast scripts
Post by: Dador 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:
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ThorntonWeather 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil 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

Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: ThorntonWeather 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: meteosanjuan 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 (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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: cbnidk 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Weerstation on January 27, 2024, 03:34:18 AM
I am having the same problem.
Did you find a solution yet?
Title: Re: Support of the "Leuven" Forecast scripts
Post by: cbnidk 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Weerstation 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.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: cbnidk 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Weerstation 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.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: Vasco 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  :)
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on January 27, 2024, 09:45:38 AM
New version 4.13 of the Leuven-Forecast (https://pwswd.be/wsfct4/) scripts online.
Solved:
Attached zip of the 4 changed scripts only.

Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: meteosanjuan 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

Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil 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
Title: Re: Support of the "Leuven" Forecast scripts
Post by: meteosanjuan on February 26, 2024, 02:14:41 PM
Perfect, following your instructions it is already modified and working. Thanks for everything.
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 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


Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 01, 2024, 02:26:49 AM
Could you please tell me if there is any fix that I can apply to stop these errors occurring
Hi Keith,
Thanks for the zip.
There are very strange errors, I have to investigate today how and what is causing this.
Quote
and hence have no errors reported when the Norway forecast is accessed my website?
Script: _metric_settings.php
Lines 8-12 now read:
#-----------------------------------------------
#                       error messages on or off
#    always set to false for production versions
#
$ws_errors      = true; # false when ready testing     
#-----------------------------------------------
Change in line 12 the word true  to false

This will not solve the real problem.
But there should be no error messages.

I will do some testing to see if the problem occurs here also.

Regards,
Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 01, 2024, 05:42:42 AM
Could you please tell me if there is any fix that I can apply to stop these errors occurring
Hi Keith,
Thanks for the zip.
There are very strange errors, I have to investigate today how and what is causing this.
Hi Keith,

I captured the metno-data for your location to test with.
Attached a version which add another  check for  "incomplete" day-parts.
Make a copy of your current wsIncMetnoHtml4.php script before replacing it.

It should remove most errors form your error log, but I could not produce all messages you had.

Regards,
Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 on March 01, 2024, 06:26:26 AM
Thanks for your prompt replies and help in this matter.  I have done what you asked in replies 150 & 151.  We will see what happens in the next few days.

Keith
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 on March 07, 2024, 04:50:46 PM
Hi Wim

This appeared when checking my website this morning:
 [ You are not allowed to view attachments ]

Also since updating the wsIncMetnoHtml4.php script as requested, the times of "forecast data created at" and "next update" at page top right as well as the "forecast data created at &c" at bottom right do not appear.

Thanks for your continued help.

Keith
Title: Re: Support of the "Leuven" Forecast scripts
Post by: wvdkuil on March 08, 2024, 03:15:43 AM
Hi Wim

This appeared when checking my website this morning:
There are two causes for this warning:
1. Maintenance at met.no
-> Please click the link, the link will run in your browser and it will contain a message from met.no why there was no data.

2. A problem with accessing the met.no website from your web-server.
-> Right click at the message and select "show html" or similar (depends on your borwser).
This will show the complete html.

Quote
Also since updating the wsIncMetnoHtml4.php script as requested, the times of "forecast data created at" and "next update" at page top right as well as the "forecast data created at &c" at bottom right do not appear.
As we switched off the test-mode, the date/times are not shown according to the settings.
From API version 2 they are not always "correct"

But you can switch them on in your page-settings in wsMetnoPage.php. Lines 62 - 67 now read
Code: [Select]
#-----------------------------------------------
#                         some yes / no settings
#-----------------------------------------------
#   true = display loading time of this forecast
#               false = do not display time info
$metno_times            = false; 

Change that false on line 67 to true

Succes,
Wim
Title: Re: Support of the "Leuven" Forecast scripts
Post by: griffo42 on March 09, 2024, 02:15:16 AM
Wim

Thank you.

Keith