I’ve just finished a new script (ec-lightning.php V1.00 - 15-Oct-2016) to fetch, resize/cache, and display the Lightning Danger Map from the Environment Canada website. The script works similarly to the ec-radar.php script in that it caches the pages/etc in the ./radar/ directory by default.
Here’s a live sample (updated whenever someone visits the script page) of the output
Standalone users: please use the script page for instructions and download. Saratoga Base-Canada template users: please use the Update tool page with a query for Base-Canada, Plugin-*, 15-Oct-2016
to get a complete set of the updates. Note that a Settings.php and flyout-menu.xml are included. You don’t have to replace them if you don’t want to-- they are updated with entries to support the new ec-lightning.php and wxeclightning.php pages on the site. See the ec-lightning-README.txt for additional information.
Am I the only one seeing the following message when trying to use the ‘ec-lightning’ script:
"Notice: Undefined variable: newestImageIdx in ec-lightning.php on line 792..."
It appears the variable ‘$newestImageIdx’ is not passed to (missing from) the following function (at line 765, I think):
function ECL_gen_animation( $numImages, $lightningID, $lightningDir, $aniSec ){...}
Should the variable ‘$newestImageIdx’ not be part of (added to) the global variables inside that function (lines 767/768, I think) to remove the message, such as: