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

0 Members and 1 Guest are viewing this topic.

Offline Daali

  • weather n00b
  • Senior Contributor
  • ****
  • Posts: 165
    • The weather in Jefferson, GA
Re: Support of the "Leuven" Forecast scripts
« Reply #75 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.
« Last Edit: January 22, 2022, 12:16:46 PM by Daali »

Offline ghera

  • Member
  • *
  • Posts: 7
Re: Support of the "Leuven" Forecast scripts
« Reply #76 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]

Offline ghera

  • Member
  • *
  • Posts: 7
Re: Support of the "Leuven" Forecast scripts
« Reply #77 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?


« Last Edit: January 22, 2022, 04:28:33 PM by ghera »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #78 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.
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline cbnidk

  • Member
  • *
  • Posts: 2
    • Vejret i Esrum
Re: Support of the "Leuven" Forecast scripts
« Reply #79 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

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #80 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
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline ghera

  • Member
  • *
  • Posts: 7
Re: Support of the "Leuven" Forecast scripts
« Reply #81 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

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #82 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
« Last Edit: January 24, 2022, 04:58:18 AM by wvdkuil »
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline cbnidk

  • Member
  • *
  • Posts: 2
    • Vejret i Esrum
Re: Support of the "Leuven" Forecast scripts
« Reply #83 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

Offline ghera

  • Member
  • *
  • Posts: 7
Re: Support of the "Leuven" Forecast scripts
« Reply #84 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
« Last Edit: January 27, 2022, 02:25:28 PM by ghera »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #85 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
« Last Edit: January 27, 2022, 03:42:55 PM by wvdkuil »
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline ghera

  • Member
  • *
  • Posts: 7
Re: Support of the "Leuven" Forecast scripts
« Reply #86 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.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #87 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 .
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline ghera

  • Member
  • *
  • Posts: 7
Re: Support of the "Leuven" Forecast scripts
« Reply #88 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.
« Last Edit: January 28, 2022, 01:05:54 PM by ghera »

Offline MarkDM

  • Member
  • *
  • Posts: 9
    • Weerstation Berlare
Yrno -->> Metno
« Reply #89 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

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.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Yrno -->> Metno
« Reply #90 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

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.


Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
"Leuven" Forecast scripts latest version available for PHP 8.1
« Reply #91 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
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline MarkDM

  • Member
  • *
  • Posts: 9
    • Weerstation Berlare
Re: Support of the "Leuven" Forecast scripts
« Reply #92 on: February 21, 2022, 12:49:13 PM »
I found this page of donators:
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

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #93 on: February 21, 2022, 01:06:47 PM »
I found this page of donators:
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
« Last Edit: February 21, 2022, 01:09:08 PM by wvdkuil »
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: Support of the "Leuven" Forecast scripts
« Reply #94 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
« Last Edit: March 13, 2022, 05:52:35 PM by Gert Woerden »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #95 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





Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: Support of the "Leuven" Forecast scripts
« Reply #96 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 

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1917
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #97 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 and here

« Last Edit: March 15, 2022, 07:39:42 AM by wvdkuil »
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: Support of the "Leuven" Forecast scripts
« Reply #98 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

Offline djroby19

  • Senior Member
  • **
  • Posts: 88
    • Pomeziameteo
Re: Support of the "Leuven" Forecast scripts
« Reply #99 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