Author Topic: Support for the "Leuven" Meteoalarm script  (Read 1094 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1451
    • My PWS at Leuven Belgium Europe
Support for the "Leuven" Meteoalarm script
« on: March 29, 2019, 04:36:11 AM »
Demo: https://www.weerstation-leuven.be/demowarningv3/demoWarning.php?lang=en
Download: https://leuven-template.eu/leuven_download2019.php?id=meteoalarm
Urgent temporary update: https://www.wxforum.net/index.php?topic=36482.msg376138#msg376138
Readme: The demo link has examples and full documentation about  settings and install
Known issues: link will be added when needed

Remarks:
To find the warnings for your region this  script "scrapes" the html page for your region from the meteoalarm website. As far as I know there is no other way (yet) to get the data as f.i. the RSS feeds are incomplete. There should be a better way but for now we are stuck doing it the "wrong" way.
Scraping can also result in multiple errors as  even a small change of the meteoalarm website-layout can disturb the scraping.  So when using this script make sure you can easily switch it on/off on your page.

Warning:
The settings are at the start of the script. The language translations are at the bottom. There is a big warning after the settings not to change the script itself. So if you are stupid enough to change the coding lines, do not post questions here why the script fails. Do a fresh download and only change those lines which should be changed.
Especially: DO NOT CHANGE THE URL to the meteoalarm web-site.  That one is correct. And yes, the English language is the correct language to use for scraping your regional page! 100% sure.

Support:
When you post questions about the scripts, please always include the URL (=correct link)  to the script on your website. That reduces the time for answering your questions.

Wim
« Last Edit: April 10, 2019, 08:08:34 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.weather-template.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1526
    • Texas Weather
Re: Support for the "Leuven" Meteoalarm script
« Reply #1 on: March 29, 2019, 12:24:26 PM »
Thank you WIm!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1451
    • My PWS at Leuven Belgium Europe
Re: Support for the "Leuven" Meteoalarm script
« Reply #2 on: April 10, 2019, 08:03:21 AM »
There are today (2019-04-10) severe problems with the meteoalarm server.
Multiple  503 errors but the scripts catch them correctly.

But most of the time the php scripts are not executed but returned as html.
My meteoalarm script fails severely  :oops: on this unexpected garbage.

Attached a temporary fix,

Wim
« Last Edit: April 10, 2019, 08:05:34 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.weather-template.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline KoenDV

  • Member
  • *
  • Posts: 2
    • Weerstation Haacht
Re: Support for the "Leuven" Meteoalarm script
« Reply #3 on: July 20, 2019, 03:45:09 AM »
Thanks for the Meteoalarm script!
I wonder, is it possible to get only the Dutch text, and not both Dutch and French?

Regards,
Koen

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1451
    • My PWS at Leuven Belgium Europe
Re: Support for the "Leuven" Meteoalarm script
« Reply #4 on: July 28, 2019, 10:17:37 AM »
Thanks for the Meteoalarm script!
I wonder, is it possible to get only the Dutch text, and not both Dutch and French?

Regards,
Koen
It is a setting where you choose the main language.
When checking your website it seems to display correct now.

Wim
« Last Edit: July 28, 2019, 02:20:15 PM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.weather-template.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline KoenDV

  • Member
  • *
  • Posts: 2
    • Weerstation Haacht
Re: Support for the "Leuven" Meteoalarm script
« Reply #5 on: July 29, 2019, 07:46:01 AM »
Hi Wim,
I've set
Code: [Select]
$lang= 'nl';
$warningSplit= true;
but both languages were still shown, so finally I could adapt the script so it does only shouw the Dutch text and the word 'nederlands' is stripped for BE  ;)

Regards,

Koen