|
|
This is an easy-to-use and light-weight module for displaying 4-day weather forecast using the free wunderground API.
This module makes use of the Wunderground Weather API (formerly Google Weather API) to display the current temperature, weather condition and a four-day weather forecast, as you can see on the left of the page.
Note that the free version of the wunderground.com Weather API has a limit of 500 calls per day. The latest version of the Wunderground Weather Module has a built-in cache system to greatly reduce the number of requests to wunderground.com for similar weather requests made within a specified time period.
Live Demo
You can see a live demo on the sidebar of this page.
Unique Features
This is the first, and currently the only weather module with the following features:
- Uses the Wunderground Weather API (formerly Google Weather API) that provides 4-day weather forecast with images.
- Allows user to interactively enter zip codes (for US, UK and Canada) and city names.
- Displays the weather information in many different languages, as provided by Wunderground.
- Allows you to display two or more weather modules in the same page.
- You can turn on or off the input field.
- You can specify the default unit for the temperature (in °C or °F)
- You can switch between °C or °F interactively with no reloading of pages.
- You can choose to display wind speed in mph or km/h
- Available for all Joomla versions: Joomla 1.0.x, native 1.5.x, 1.6.x, 1.7.x, 2.5.x and 3.0.x!
Latest Version
v3.0.10 (for Joomla 3.0)
Released April 19, 2013
Support for different $dbprefix
v3.0.9 (for Joomla 3.0)
Released April 6, 2013
Native version of Wunderground Weather Module for Joomla 3.0!
v1.09 (for Joomla 1.0) and v1.59 (for Joomla 1.5), v1.69 (for Joomla 1.6), v1.79 (for Joomla 1.7), v2.5.9 (for Joomla 2.5)
Released October 27, 2012
Google has stopped its Google Weather API service entirely. Details here.
The latest version uses the API from wunderground.com
However, the free version of wunderground.com Weather API has a limit of 500 calls per day. If you go beyond 500 calls per day, the module will stop working!
This latest version of Wunderground Weather Module has a built-in cache system to greatly reduce the number of requests to wunderground.com for similar weather requests made within a specified time period.
- The default time period is 60 minutes - what this means is that if you request for the weather of "San Francisco, CA" for the first time, the weather info will be retrieved from wunderground.com. However, anyone who makes a subsequent weather request of "San Francisco, CA", as long as it still falls within 60 minutes, the weather will be retrieved from the cache without making any calls to wunderground.com.
- You can change the time period in the Module Manager's parameter page.
- In the parameter page, you can also set the Admin Mode to Yes so that you can see the cache system in action. The default is Admin Mode = No.
Another very important addition to this new version is that the module now remembers the previous city entered by the user. For example, suppose the user has searched for the weather of "Paris, France". When she come back to the same page a couple of days later, the weather for "Paris, France" will be displayed instead of the default city as specified in your parameter page.
Very Important
- I've implemented the Google Weather Mashup with the use of PHP's cURL library. So please make sure your PHP has the cURL library installed in order to use this module.
- Note that this module works only with PHP5 and above because of the use of the PHP function simplexml_load_string which is only available starting with PHP5.
Download
Joomla 1.5.x: mod_kksouGoogleWeather_v1.59.zip
Joomla 1.6.x: mod_kksouGoogleWeather_v1.69.zip
Joomla 1.7.x: mod_kksouGoogleWeather_v1.79.zip
Joomla 2.5.x: mod_kksouWeather_v2.5.10.zip
Joomla 3.0.x: mod_kksouWeather_v3.0.12.zip
How to install
- First, make sure you're using PHP5 and above.
- Download and install the "kksou Weather Module".
- Make sure the module is published / enabled.
- Select a module position where you want to place the module.
That's it! You should now see the kksou Google Weather module displayed in the module position you've specified.
Parameters
You can set the following in the Parameters page:
- Default City: This is the city that will be displayed when the module is first loaded. For USA, please specify City, State. For other countries, please specify City, Country
- Language: Wunderground supports many different languages. The language code can be found here: Wunderground Language Support. Note that the language code is different from the standard ISO 639-1 format.
e.g. English isen
, French isfr
, Italian isit
, Japanese isjp
, Chinese simplified iscn
, Chinese Traditional istw
. - Unit for temperature: Choose between displaying the temperature in °F or °C.
- Hide Input Field: If all you want is to display the weather forecast of a particular city, and DO NOT want the user to change that, you can select 'Yes' to hide the input field.
- Hide Humidity: Select 'Yes' if you wish to hide the humidity information.
- Hide Wind: Select 'Yes' if you wish to hide the wind information.
- Hide Forecast: Select 'Yes' if you wish to hide the 4-day weather forecast.
- Label for 'City': This is the label that is displayed just before the input field. The default label is 'City'. You can change the label into your own language and label.
- Size of Input Field: Size of the input field. Default size is 12.
- Request Interval: If you do some research on google, you will see that there arer cases where Google will "ban" your site from accessing the Google Weather API if the request is made too often (e.g. some sites try to get the weather forecast of all cities in US through a robot). By default, I set a interval 3 seconds between each request to Google. This will prevent your users from making too frequent weather forecast requests via your website. If you are not concerned about this, you can reduce this to 1 second.
- Set Focus on Input Field: Set the focus (i.e. put the prompt) on the input field for city. Default is Yes.
For some countries (e.g. US, UK and Canada), you can just enter the zip code. E.g. '94305, CA', 'W1A 1AZ, UK'.
Styling the Module using CSS
The entire formatting of the stock quotes is done using CSS. If you do not like the default look and feel of the stock data, you can edit the following CSS file:
<your joomla root folder>/modules/mod_kksouGoogleWeather/mod_googleWeather.css
- Input Field (for entering city name)
- Input Label (the label 'City')
- The current temepature
- The image of the current weather condition
- The current weather condition
- The current wind condition
div.googleWeather input { margin-bottom: 6px; }
div.googleWeather .input_label { font-weight:bold; }
div.googleWeather .deg { font-size: 100%; color: #3366FF; font-weight:bold; }
div.googleWeather .img2 { float: right; }
div.googleWeather .cond { font-size: 100%; }
div.googleWeather .wind { font-size: 100%; }
History
- v1.0.1 (for Joomla 1.0) and v1.5.1 (for Joomla 1.5)
Released October 6, 2009 - v1.0.2 (for Joomla 1.0) and v1.5.2 (for Joomla 1.5)
Released January 20, 2010 - Allow user to define the popup prompt in their own language. This is in response to the request by Doug.
- Added support for IE8. Thanks to Mike for contributing this.
- No longer shows San Francisco in the input field when you have defined other city as default.
- v1.0.3 (for Joomla 1.0) and v1.5.3 (for Joomla 1.5)
Released February 14, 2010 - v1.0.4 (for Joomla 1.0) and v1.5.4 (for Joomla 1.5)
Released May 06, 2010 - v1.0.5 (for Joomla 1.0) and v1.5.5 (for Joomla 1.5)
Released May 16, 2010 - v1.6.6 (for Joomla 1.6) and v1.7.7 (for Joomla 1.7)
Released October 10, 2011 - v1.6.7 (for Joomla 1.6) and v1.7.7 (for Joomla 1.7)
Released October 16, 2011 - v1.07 (for Joomla 1.0) and v1.57 (for Joomla 1.5), v1.67 (for Joomla 1.6), v1.77 (for Joomla 1.7), v2.5.7 (for Joomla 2.5)
Released January 26, 2012 - v1.08 (for Joomla 1.0) and v1.58 (for Joomla 1.5), v1.68 (for Joomla 1.6), v1.78 (for Joomla 1.7), v2.5.8 (for Joomla 2.5)
Released August 31, 2012
Streamlined the javascript codes.
This is in response to the request by Mazgonar.
Added one more parameter in the config page to allow user to choose whether to set focus on the input field for the city.
Conform to joomla.org guidelines.
The module is now W3C XHTML 1.0 Transitional compliant.
Native version of the Google Weather Module for Joomla 1.6 and 1.7!
Support for km/h for wind speed. If you display the temperature in degree Celsius, the wind speed will be displayed in km/h. If you display the temperature in degree Fahrenheit, the wind speed will be displayed in mph.
Note: By default, Google only returns the wind speed information in mph. I used the PHP function preg_match()
to search for the string "mph". If you have displayed the weather information in other languages (e.g. Russian) which does not display miles per hour as "mph", the module will just display whatever wind information that is returned by Google.
Native version of the Google Weather Module for Joomla 2.5!
Google has stopped its Google Weather API service entirely. Details here.
The latest version uses the API from wunderground.com
Comments
I wanted to leave a nice review for you on the JED but your link there is down, it says the link to downloading this module is broken. Hope you get that fixed soon - you deserve the product to be used more.
Thank you again
Thanks a lot for informing me about this. Appreciate this greatly.
Have updated the demo link and informed Joomla.org. Guess it will take them a couple of days for review and reactive the page.
Thanks once again!
Warm Regards,
/kksou
thanks
The css file is in the folder: [Joomla_root_folder]/modules/mod_kksouGoogleWeather
css file: mod_kksouGoogleWeather.css
Please note that most browsers cache the css style sheets. So after editing and saving the css file, remember to clear the browser cache.
The best way I find is to point your browser to your css file and load the css file in the browser. You can see very clearly if the browser is still using the old cached version or your latest edited version. (Just keep hitting refresh until the browser reloads the fresh copy.)
Let me know if it works, ok?
Regards,
/kksou
I have a problem with scandic letters (åäö) with finnish language. The module displays them wrong and it becomes messy :/
Are you referring to
1) the city input field, or
2) the weather result returned by Google?
You have an URL to show the actual output?
Regards,
/kksou
Here's an URL: http://www.sivutuote.com/sivut/metsa/
Just went to your site. Did a view source. Think the only difference between your page and my page (kksou.com) is in your header, in which yours is lang="fi-fi".
Can you try setting the lang to other settings, such as utf-8? This will allow you to see if it's the problem with the language setting.
Interesting, I did a view source for some Finnish language websites e.g.
http://www.gps-waypoints.net/gps/?language=fi
http://www.infopankki.fi/en-gb/finnish_language/
Both did not have the setting lang="fi-fi".
Instead, one has:
content="text/html;charset=ISO-8859-1"
The other has: content="text/html;charset=UTF-8"
So would suggest you do some testing with the content and lang settings and see if your web pages display correctly, and the weather information returned by google also displayed correctly.
Regards,
/kksou
By the way, just for your info, while the google weather information can be in many different languages, Google only allows you to enter the city name in English. Yes, English only.
It's Google. They set the rule. So there's nothing much we can do about this...
Regards,
/kksou
broken link. doesnt end.
Just tested the download link. It works fine.
For your convenience, have emailed a copy of the module to you.
Regards,
/kksou
This usually means there's no result returned from the Google Weather server.
Which city are you trying to search? Does this happen to every city?
Sometimes it could be just that the Google Weather server is not running.
Regards,
/kksou
At the moment, it's down completly.
The errors you are having atm, are the same as mine.
Can you fix it if possible?
Jeroen
Google has stopped its Google Weather API service entirely since August 7th!
For more information, please refer to the following article:
http://www.kksou.com/php-gtk2/Joomla-News/Google-has-stopped-its-Google-Weather-API.php
Regards,
/kksou
Please refer to the article: The new Google Weather module
http://www.kksou.com/php-gtk2/Joomla-News/The-new-Google-Weather-module.php
Regards,
/kksou
I am using Croatian language.
Sunday and Monday are using english abbreviation (sun, mon) while tuesday and wednesday are using proper croatian abbreviation (uto, sri).
Regards,
Branko
Thanks for the feedback.
All weather info, including the translations, are direct from wunderground.com, not from within the Jooomla module.
You might want to feedback this direct to wunderground.com so that they can make the improvement.
Regards,
/kksou
scroll down and you'll see multiple city(Lagos, Nigeria) whereas city like Ibadan, Nigeria and Ilorin, Nigeria are being updated..what can be done??
when the search form is active and you type lagos, nigeria, it brings out 2 results..that's where the problem comes from !
However, how do I now my my extentions workable again? I did try to download the extention again, thinking it was updated to now work with wunderground but it's
clearly still the 'old' extention? HOw do I go about making it work again?
On surface, the googleWeather module looks the same. At the backend, it now retrieves the weather info from wunderground.com instead of google.com.
All you need to do is to uninstall the previous version of googleWeather and then install the latest version.
Regards,
/kksou
There is a mistake with the japanese language : sunday is ??? and not ??.
Can you fix it? How can i do it by myself?
thanks!
The entire weather info is returned by wunderground.com. You may want to contact wunderground.com directly to tell them that the translation is wrong.
Regards,
/kksou
Thanks Man!
kksou weather module is the best Joomla weather module. Unfortunately important difference between previous Google version and this wunderground version is that this version is free only if the module on the site calls to wunderground.com less then 500 times per day or 10 calls per min. Otherwise API is disabled and module is out of order to the rest of the day.
Glad to know that you find it useful.
Yes, I'm fully aware of the 500 calls limit per day. I'm currently improving on the module to cache the weather result so that it will only make a call, say once every 15 minutes to stay within the limit.
It's almost done and I'm in the midst of testing to make sure that everything's working fine. Should be able to roll out the new version by this weekend.
Will let you know once it's released, ok?
Regards,
/kksou
I followed the instructions, but when I endabled the module, the site does not load at all - just a blank screen. When I diabled the module, the site works again. Any idea? thank you
Any other clues you can give?
Looks like conflict with your other modules, plugins or even the Joomla template. Without any other info, it's really difficult to infer anything.
The only surest way to try if it's a conflict is to install a fresh copy of Joomla somewhere on your server, then install only the module (using the standard Joomla template). This will allow you to see if the module works at all on your machine.
Regards,
/kksou
here is system info, and I downloaded 1.58 of your weather:
PHP Built on: Linux js1.joomlaservices.ca 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64
Database Version: 5.1.63-cll
Database Collation: utf8_general_ci
PHP Version: 5.2.17
Web Server: Apache
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.15 Stable [ Wojmamni Ama Mamni ] 05-November-2009 04:00 GMT
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0.1
Warning: require_once(/includes/defines.php) [function.require-once]: failed to open stream: No such file or directory in /home/udica/public_html/modules/mod_kksouGoogleWea ther/mod_kksouGoogleWeather_setup.php on line 17
Fatal error: require_once() [function.require]: Failed opening required '/includes/defines.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/udica/public_html/modules/mod_kksouGoogleWea ther/mod_kksouGoogleWeather_setup.php on line 17
Regards,
Branko
Do not have enough clues based on the information you've provided to know what's the cause of the problem.
In the meantime, this is what you can do:
1) Edit the file: /home/udica/public_html/modules/mod_kksouGoogle Weather/mod_kksouGoogle Weather_setup.php
2) In Line 15, you will see:
$includes = $joomla_root.DS.'includes';
3) Just before this line, add this:
$joomla_root = '/home/udica/public_html';
Save the file and see if it works now.
By right, $joomla_root should be automatically set in the program. But seems like it's not working properly. So what (3) does above is to set the path to the joomla_root manually.
Let me know if it works, ok?
Regards,
/kkosu
If I specify the city "Ayamonte, Spain" in your web it does display the weather forecast, however in my website it just displays "There was no response from the weather server."
Admin mode displays:
> city NOT FOUND in cache
> number of calls = 460
> retrieve fresh data from server
using Joomla! 1.5.26, therefore mod_kksouGoogleWeather_v1.59 version.
Any idea? Thanks!
I haven't replied before because I am not sure why it is working now.
I changed it as you said but it did not help so I reverted file to original one and it works since then :)
Regards,
Branko
Thanks.
You can send via the feedback form.
Regards,
/kksou
I need help.
I downloaded and installed mod_kksouGoogleWeather 1.5.9 modul (on Joomla 1.5.26), but it does not work correctly for me.
it just displays "There was no response from the weather server."
If admin mode is set on, it displays:
> city NOT FOUND in cache
> number of calls = 260
> retrieve fresh data from server
"There was no response from the weather server."
- cURL enabled (cURL Information: libcurl/7.21.0 GnuTLS/2.8.6 zlib/1.2.3.4 libidn/1.15)
- I have registered in wunderground.com for API Key and set in the modul configuration (www.annabar.hu).
- I tried more than one city and zip code, but the same result
Please give me some advise, why modul not working? What is the problem?
Thanks
Apesz
What is the city and zip code that you've tried?
Can you try "San Francisco, CA" and let me know if it works?
Regards,
/kksou
I tried the following locations, don't work none of them
San Francisco, CA
Budapest, HU
Rome, IT
Amsterdam, NL
I enabled the input field of modul, so you can test it (www.annabar.hu - left colum: Weather report modul)
Have just emailed you.
Let me know if it works, ok?
Regards,
/kksou
I have create a module and put it on the left and it never stop searching
I have php5 and curl on my server
I am using NANO template from yootheme
nonumber component like advance module management and module anywhere etc ...
but for that test I am only put my module on the left (side-b) of the template
I am testing with San Francisco, CA
help me please and I will buy the 10$ remove created by license
thx
here is the url of my test website
http://www.domainederouville.com/dev/
Have just emailed you.
Let me know if it works, ok?
Regards,
/kksou
non not working ... module still searching
Regards,
/kksou
Joomla! 2.5.9
just installed latest Version to Joomla 3.0.3. Get a missing file failure:
Warning: require_once(xxxx/xxxx/modules/mod_kksouGoogleWeat herDShelper.php) [function.require-once]: failed to open stream: No such file or directory in /xxxx/xxxx/modules/mod_kksouGoogleWeather/mod_kkso uGoogleWeather.php on line 16
Fatal error: require_once() [function.require]: Failed opening required '/xxxx/xxxx/modules/mod_kksouGoogleWeatherDShelper .php' (include_path='.:/usr/local/lib/php') in /xxxx/xxxx/webseiten/maasholm_303/modules/mod_kkso uGoogleWeather/mod_kksouGoogleWeather.php on line 16
File's not in the modules directory! What to do?
Regards,
Marko
That's really strange. Joomla defines DS by dfault to '/' or '\' depending on which OS you are running.
I'm running this module on one of my other sites running Joomla 3.0.3 and it's ok.
In any case, here's what you can do:
1) Go to your [Joomla_root_folder]/modules/mod_kksouGoogleWeather
2) Edit the file: mod_kksouGoogleWeather.php
3) Go to line 14. You should see
defined('_JEXEC') or die('Restricted access');
require_once (dirname(__FILE__).DS.'helper.php');
4) Please add one more line to define DS just before the require_once so that it becomes:
defined('_JEXEC') or die('Restricted access');
if (!defined('DS')) define( 'DS', '/' );
require_once (dirname(__FILE__).DS.'helper.php');
4) Save and close the file.
Now reload the page.
Please let me know if it's working now.
Regards,
/kksou
thanks for the support. That little snipped did the trick! Now things are working on my server.
Another thing that seems strange to me, is that no language code works. Tried de, fr and zh-cn, what should change?
Greetz,
Marko
The language "seems" to be not working because of the cache.
I added a built-in cache because wunderground.com allows only 500 requests per day, which is about 10 requests per hour (note: each weather search requires 2 requests - one to get the current weather info, and the other to get the weather forecast for the following 4 days.)
The default time for cache is 60 min - i.e. if any users search for the same city within 60 min, it will retrieve the value from the cache.
To see whether the language works, you can change the cache time to 1 min temporarily. Change the language setting and reload the page after 1 min. You should be able to see the new weather info in the new language.
By the way, wunderground.com uses a different language code than the standard ISO. The language code setting is here.
Please give it a try and let me know if it works. Don't forget to change the cache time back to 60 min after you see that the language works. Otherwise you will use up the 500 requests very fast.
Regards,
/kksou
RSS feed for comments to this post