Weather Add-on for the 2010 Template
This module adds the weather app to the 2010 state template. (Note: eServices does not provide support for this add-on).
Instructions
- Download the files (zip).
- Extract the zip to the root folder of your website.
- How to create a detail page:
Create a new blank page using your template. Copy the following code into the body of the page.<script type="text/javascript">Save this page as /weather/weather.html .
var weatherDetailPath = "/weather/weather.html";
var weatherLayout = "detail"; // detail or summary
</script>
<script type="text/javascript" src="weather.js"></script>
- Open your main template files (BasicTemplate.dwt, TwoColumns.dwt, etc.). Copy this line to the end of the <head> section.
<script type="text/javascript" src="/weather/weather_2010_template.js"></script>
<link rel="stylesheet" href="/weather/weather_2010_template.css" media="screen, projection, print, tv" type="text/css" /> - Open your header SSI file (header.megadropdown.html or header.mininav.html). Copy these lines to the file, immediately after the "head_links" closing div.
<script type="text/javascript" src="/weather/weather3.js.asp"></script>
<noscript><div><a href="/weather/weather.html" id="weather_container">Weather</a></div></noscript> - Open the file "get_weather_data.vbs" in an editor. Update the variable "strOutputFile" (line 24) with the full path to the file "weather_sacramento.xml", starting with the drive letter.
- Add a task to Windows Scheduler to run "get_weather_data.vbs" every 20 minutes.
