<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Interconnect IT - WordPress Consultants, Web Development and Web Design &#187; Widgets</title>
	<atom:link href="http://interconnectit.com/tag/widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://interconnectit.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 17:36:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress Weather Widget</title>
		<link>http://interconnectit.com/1474/wordpress-weather-widget/</link>
		<comments>http://interconnectit.com/1474/wordpress-weather-widget/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 12:25:01 +0000</pubDate>
		<dc:creator>Robert O'Rourke</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Weather]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://interconnectit.com/?p=1474</guid>
		<description><![CDATA[We found many of the weather widgets and badges out there lacking. Either they were not aimed at regular users (having to track down your own locid for non-US addresses for example) or they had rate limits on the API.  And almost all were just plain ugly.  We had to fix that.]]></description>
			<content:encoded><![CDATA[<blockquote><p>I must have a weather forecast on my site!!</p>
<p style="text-align: right;"><em>Anonymous Client</em></p>
</blockquote>
<div id="attachment_1478" class="wp-caption alignright" style="width:280px;"><a href="http://www.interconnectit.com/wp-content/uploads/2010/12/extended-widget.jpg"><img class="size-full wp-image-1478" title="Extended mode widget" src="http://www.interconnectit.com/wp-content/uploads/2010/12/extended-widget.jpg" alt="" width="280" height="413" /></a><p class="wp-caption-text">Extended mode display</p></div>
<p>You may well have heard these exact words, or at least something similar. We certainly did but found many of the weather widgets and badges out there lacking. Either they were not aimed at regular users (having to track down your own locid for non-US addresses for example) or they had rate limits on the API.</p>
<p>We had tried using the Yahoo weather badge at first however as soon as traffic to our client&#8217;s site increased the widget would become unavailable before lunch time due to exceeding the limits. As a result we decided to put together our own simple weather widget that would never be unavailable by using cached data from the Google Weather API.</p>
<h3>Download</h3>
<p>The weather widget is available from the <a title="WordPress Weather Widget" href="http://wordpress.org/extend/plugins/interconnect-it-weather-widget/">WordPress.org repository for download and installation</a>.  You can also see <a title="Weather Widget Download Stats" href="http://wordpress.org/extend/plugins/interconnect-it-weather-widget/stats/">download stats</a>.</p>
<h3>Installation</h3>
<p>Copy the contents of the zip file to your plugins directory. Proceed to the plugins page and activate the ICIT Weather Widget.  Alternatively, use the automatic download and install available from the plugins page of your WordPress back-end.</p>
<p><em>Please note you will need a theme that supports dynamic sidebars</em>.</p>
<h3>Usage</h3>
<div id="attachment_1479" class="wp-caption alignright" style="width:260px;"><a href="http://www.interconnectit.com/wp-content/uploads/2010/12/widget-form.jpg"><img class="size-full wp-image-1479" title="Widget form" src="http://www.interconnectit.com/wp-content/uploads/2010/12/widget-form.jpg" alt="" width="260" height="590" /></a><p class="wp-caption-text">The weather widget form</p></div>
<p>Go to the widgets page. There you will find the multi-use ICIT Weather Widget. Drop it into a sidebar to get started. You will be presented with the form to configure the widget.</p>
<ul>
<li><strong>Title</strong><br />
The title is optional but will override the display of the location if set.</li>
<li><strong>Country</strong><br />
Choose the country you want to look at the weather in.</li>
<li><strong>City, town, postal or zip code</strong><br />
Use this field to narrow down the search some more, for example putting in &#8216;L1&#8242; or &#8216;Liverpool&#8217; will get the weather information for that location.</li>
<li><strong>Widget display</strong><br />
Choose from a compact or an extended display mode. In extended mode the full weather forecast for the current day is shown including humidity and wind conditions. In compact mode you get a small icon, the day name and the temperature range for the day.</li>
<li><strong>Show forecast for&#8230;</strong><br />
You can show up to an extra 3 days of weather forecasts in their compact form after the current day.</li>
<li><strong>How often to check the weather</strong><br />
Set a timer in minutes for how often the widget should poll the API for updated weather information. Default is 60 minutes.</li>
<li><strong>Show temperature in Celsius</strong><br />
This should be fairly obvious! Toggle between displaying degrees farenheit and degrees celsius.</li>
<li><strong>Output CSS</strong><br />
Toggle the default styling on or off for the widget instance.</li>
<li><strong>Show Interconnect/IT credit link</strong><br />
The plugin is free so we appreciate the support and traffic the credit link can drive our way but you can switch it off if you prefer.</li>
</ul>
<h3>Feedback / Suggestions / Bugs?</h3>
<p>If you have any comments, suggestions or feature requests leave them below. Please remember we can only fit the work in as time permits so only the most requested or useful features will go in. The aim is to keep the widget simple.</p>
<p>We would also like to hear if you find any bugs while using the plugin so we can rectify them.</p>
<p>Please <em>DO NOT</em> email us for support unless you are a paying customer &#8211; we will no longer reply.</p>
<h2>Update:</h2>
<p>With the latest version of the weather widget we have solved a few key problems:</p>
<ul>
<li>Localisation</li>
<li>Bug when calculating forecast temperatures for certain countries</li>
<li>Added filters to avoid having to edit the core plugin when google change their API</li>
</ul>
<p>It&#8217;s not 100% but if your WordPress installation has the WPLANG constant defined anywhere or if you have a &#8216;locale&#8217; filter in your theme or a plugin then the API will return temperature data and weekdays in the specified language. We still need translations for the rest of the plugin if anyone is inclined to help us out with that.</p>
<h3>Filters</h3>
<p>Here are the filters with example uses that the plugin now gives you to play with. Generally they shouldn&#8217;t be needed but it means we can easily patch the plugin if the google API changes suddenly.</p>
<p><strong><code>icit_weather_widget_images</code></strong></p>
<p>Filters the images array. Use this if you want different icons or if google change their image file names.</p>
<pre>function new_weather_images( $images ) {
    $images['sunny'] = 'my-icons/sunny.png';
    return $images;
}
add_filter('icit_weather_widget_images',  'new_weather_images');</pre>
<p><strong><code>icit_weather_widget_check_image</code></strong></p>
<p>An alternative place to alter image paths. Parameters are the image url returned from google, an array of the icon filename and file extension and lastly a boolean to say whether the request is for a thumbnail or not.</p>
<pre>function new_weather_check_image( $image, $icon, $thumb ) {
    return array(
        'src' => get_stylesheet_directory_uri() . '/images/' . $icon[ 'filename' ],
        'key' => $icon[ 1 ] // keep this the same
    );
}
add_filter('icit_weather_widget_check_image',  'new_weather_check_image');</pre>
<p><strong><code>icit_weather_widget_na_icon</code></strong></p>
<p>If you only want to change the N/A icon you can use this filter to choose an alternative image as the fallback if you prefer a &#8216;best guess&#8217; approach eg. using the icon for clear weather.</p>
<pre>function new_weather_check_image( $image ) {
    return 'clear.png';
}
add_filter('icit_weather_widget_na_icon',  'new_weather_na_icon');</pre>
<p><strong><code>icit_weather_widget_locale</code></strong></p>
<p>This shouldn&#8217;t really be needed as the plugin looks at the <code>WPLANG</code> constant but if you do run into problems with what google returns from their API you can patch the locale string used to retrieve the weather data.</p>
<pre>function new_weather_locale( $locale ) {
    return 'fr'; // french weather data
}
add_filter('icit_weather_widget_locale',  'new_weather_locale');</pre>
<p>Note with the above you could also use the general &#8216;<code>locale</code>&#8216; filter in WordPress however the effect of that is site-wide and may not play too nicely with poorly written plugins/themes.</p>
]]></content:encoded>
			<wfw:commentRss>http://interconnectit.com/1474/wordpress-weather-widget/feed/</wfw:commentRss>
		<slash:comments>163</slash:comments>
		</item>
	</channel>
</rss>

