Author Topic: Environment Canada 7 days forecast page for Weather Blues v2  (Read 4275 times)

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1103
    • http://www.meteostours.ca
Environment Canada 7 days forecast page for Weather Blues v2
« on: August 15, 2012, 11:55:46 AM »
Dear members,

Today, I launch 2 forecats pages  for Weather Blues v2 template!
You will find in Download section, 2 new Environment Canada forecasts modules:

File: EnvCan_long_forecast V1.zip (long version)
File: EnvCan_short_forecast V1.zip (short version)

Short version is an adaptation of script ec_forecast from SaratogaWX site.
Configuration:
- Edit file forecast_ecs.php on line #41 to choose language ("fr" for French or "en" for English).
- In folder include, edit ec-forecast.php file at line #60 to choose your city.

Long version is my own version, working on raw data from Environnement Canada.
It include some more informations about city, coordinates, metar names and more detailed forecast.
Configuration:
- Only 1 file to edit; extract_ec_all.php in include folder. Line #76 choose your city code.
(In file include/station_list.txt, you'll find codes for all Canadian weather stations)

Detailed instructions is included in each files you have to edit.
Weather icons are included in each version.

Both versions has been formatted for Weather Blues layout, you just have to adjust your menu
by adding this line in your menu file header_menu.php, in mainmenu section:
<li><a href="#" title="" rel="sub_forecast"><span>Forecast</span></a></li>

and these lines under mainmenu section for new submenu sub_forecast
<!--  1st drop down menu - forecast -->                                                   
<div id="sub_forecast" class="dropmenudiv_a">
   <a href="forecast_ecs.php" title="">Env.Can. forecast (short)</a>  // Short version
   <a href="forecast_ecl.php" title="">Env.Can. forecast (long)</a>   // Long version
</div>
Remove simply Long or Shrot line if you don't want both.

You can see both pages on these links:
Short version: http://weatherbyyou.com/demo/Weather_blues_v2/forecast_ecs.php
Long version : http://weatherbyyou.com/demo/Weather_blues_v2/forecast_ecl.php

These files has been tested during more than a month to try to catch all possible weather alerts,
(alerts and warnings are displayed) but exceptional weather could occur and having never occured
before to test it's reliabelity, let me know if it happens.

For comments or bugs report, use this thread .

I hope these new module will enhance your site with never seen look!

Your friendly Weathermaster
Jacques
« Last Edit: August 15, 2012, 12:28:49 PM by Mr.Meteo »
Please, consider supporting this site 

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1103
    • http://www.meteostours.ca
Re: Environment Canada 7 days forecast page for Weather Blues v2
« Reply #1 on: February 14, 2016, 01:37:02 PM »
Dear members,

I have updated these package to adapt to new Environment Canada changes.
In same time, I've updated these modules to Php 5.5 and installed languages facilities
to be a translated page that follow your current language selector setting.

Translation is done for English and French, but other language could be added
and not translated languages will display mostly in English (all words already
availables in template -14- languages are used). Instructions are in top of each page.

Instruction from previous post still apply.
Packages available in Download section.

Best Regards,
Jacques
« Last Edit: February 14, 2016, 01:39:23 PM by Mr.Meteo »
Please, consider supporting this site