RSS feed icon BTB Shadow Man BiteTheBullet.co.uk logo
Average Rating: 
Whole StarWhole StarWhole StarWhole StarHalf Star

Total number of ratings: 29

DotNetNuke Free Weather Module

What Is It?
Its a free module for DotNetNuke that will display the current weather conditions along with a two day forecast for given locations.
The module is completely free to use with the data for the weather provided by Yahoo Weather  and syndicated using RSS.

Includes the ability to define a number of different weather locations, giving the user the option to select the one they would like to view.

New Version 1.5 - 21 July 2008
Minor bug fix to the sort order of the dropdown list

New Version 1.4 - 12 May 2008
Due to a change in the data provided in the RSS feed its now no longer possible to generate 5 day weather forecasts, this release removes the 5 day forecast options for the module.

New Version 1.3 - 9 March 2008
Added the ability to display either a 2 or 5 day weather forecast. This brings to 5 the total number of different weather formats you can display on your website.

New Version 1.2 - 21 June 2007
Three display modes used to display the weather infomation, a summary mode, summary mode with 2 day forecast and detailed mode allow the administrator to define the best display mode for the portal.

summary displaymode example

Weather

Location 

Weather Report - Conditions for Carlisle, UK at 7:20 am GMT
Currently 3°C
High 10°C
Low 2°C

Mostly Cloudy
2 Day Forecast
Thu AM Fog/PM Sun
High: 10°C Low: 2°C
Fri AM Fog/PM Clouds
High: 8°C Low: -1°C
More Current Condition Details
High 10°C
Low 2°C
Wind Chill 1°C
Wind Speed 8.05 km/h
Wind Direction 260
Sunrise 6:40 am
Sunset 6:07 pm
Latitude 54.89
Longitude -2.93

Powered by Yahoo Weather

Getting started

To get started you need to enter the weather code for your location that you wish to display. To get this visit weather.yahoo.com and search for your location then view the page. The weather ID will be the last part of the URL.

For example, if you search for Manchester on the Yahoo! Weather home page, the forecast page for that city is http://weather.yahoo.com/forecast/UKXX0092.html. The location ID is UKXX0092.
You then just enter the code UKXX0092 into the module and you'll get weather information for Manchester on your DotNetNuke portal.

 

How the module works
The module creates a URL using the weather code for the location, this URL is then called and the response is a RSS feed containing the weather data for that location.

The module makes use of caching so that the weather feed is stored in the database thereby improving the performance of our site and stop us for getting an error message from the feed provider for excessive use.
The time the feed is cached is give by the TTL (TimeToLive) value of the RSS feed. Yahoo weather uses a value of 60 minutes.
The database additionally holds the time when we last got the feed and time when it will expire, if someone views the page within 60 minutes of the last download of the feed we will use the cached version. If however the cache has expired we will download the feed again and start caching for another 60 minutes.

Then we simply transform the RSS feed into HTML using a XSLT file that the module installs and hey presto we have a weather module.

If your DotNetNuke portal is running in medium trust mode then you may not be able to use this module since medium trust normally blocks webrequests.

Downloads
I have made the module available to download below and also the optional source code in C#. The module has been tested with DotNetNuke 3.x/4.x/5.x

Download PA install module
Download source code

Privacy PolicyTerms and ConditionsCopyright © 2005 - 2010 BiteTheBullet.co.uk