Updated warningsAU Block (v3.0) – fix functionality, image displays and PHP 8.x compatibility

Post Reply
SteveParry
Observer
Observer
Posts: 13
Joined: Thu Dec 26, 2019 7:16 am
Location: Samford Valley, Australia
Station model: Davis Vantage Vue
Software: CumulusMX
Contact:

Updated warningsAU Block (v3.0) – fix functionality, image displays and PHP 8.x compatibility

Post by SteveParry » Thu Jan 16, 2025 6:49 am

Please read https://www.meteotemplate.com/forum/vie ... php?t=2598 topic for background.

I am very happy to hear of any bugs or issues you are having with these blocks, and will try my best to sort them out.
For ease of tracking please lodge comments, feedback, requests etc against this topic for this Block.

Issue:
  • Version 2.2 of warningsAU stopped working when BOM prevented screen scraping access. Also threw errors in PHP 8.x.
  • Version 3.0 is attached which addresses this issue(s), includes enhancements, and fixes other bugs to enable it to run on PHP8.2. Tested on PHP7.4 and PHP8.2 using MeteoTemplate v19.0 Cranberry.
Changelog:
v3.0 - 9 January 2025
  • 20250109 (in warningsAUBlock.php) Replace retrieval of XML (rss) feed using SimpleXML commands to using rss functions from Feeds.php, courtesy David Grudl (https://github.com/dg/rss-php). This is to overcome blocks by BOM on simpleXML and loadcontent calls.
  • 20250109 (in warningsAUBlock.php) Updated data source message to refer to BOM for latest info.
  • 20250109 (in warningsAUdetail.php) Replace retrieval of XML (rss) feed using curlMain commands to using rss functions from Feeds.php.
Installation
  • Backup your current warningsAU folder, located in the homepage/blocks folder on your server.
  • Download the attached warningsAU30.zip file, upload to the homepage/blocks folder of your server, and unzip to the homepage/blocks directory. (This will overwrite your current warningsAU block folder.)
  • Use the Install/Setup Blocks in the admin menu to check the warningsAU settings are correct.
Steve Parry, Australia. www.samfordweather.com
Attachments
warningsAU30.zip
(48.82 KiB) Downloaded 602 times

Post Reply