kksou Joomla Weather Module (formerly Google Weather Module) - AJAX and built-in cache version
Written by kksou   
Sunday, 04 October 2009
download button
faq button

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.


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 Google.
  • 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.

Live Demo

You can see a live demo on the left menu of this page.

Download


How to install

  1. First, make sure you're using PHP5 and above.
  2. Download and install the "kksou Weather Module".
  3. Make sure the module is published / enabled.
  4. 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:

  1. 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
  2. For some countries (e.g. US, UK and Canada), you can just enter the zip code. E.g. '94305, CA', 'W1A 1AZ, UK'.


  3. 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 is en, French is fr, Italian is it, Japanese is jp, Chinese simplified is cn, Chinese Traditional is tw.
  4. Unit for temperature: Choose between displaying the temperature in °F or °C.
  5. 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.
  6. Hide Humidity: Select 'Yes' if you wish to hide the humidity information.
  7. Hide Wind: Select 'Yes' if you wish to hide the wind information.
  8. Hide Forecast: Select 'Yes' if you wish to hide the 4-day weather forecast.
  9. 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.
  10. Size of Input Field: Size of the input field. Default size is 12.
  11. 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.
  12. Set Focus on Input Field: Set the focus (i.e. put the prompt) on the input field for city. Default is Yes.

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

  1. Input Field (for entering city name)
  2. div.googleWeather input {
    	margin-bottom: 6px;
    }
    
  3. Input Label (the label 'City')
  4. div.googleWeather .input_label {
    	font-weight:bold;
    }
    
  5. The current temepature
  6. div.googleWeather .deg {
        font-size: 100%;
    	color: #3366FF;
    	font-weight:bold;
    }
    
  7. The image of the current weather condition
  8. div.googleWeather .img2 {
    	float: right;
    }
    
  9. The current weather condition
  10. div.googleWeather .cond {
    	font-size: 100%;
    }
    
  11. The current wind condition
  12. div.googleWeather .wind {
        font-size: 100%;
    }
    

History

  1. v1.0.1 (for Joomla 1.0) and v1.5.1 (for Joomla 1.5)
    Released October 6, 2009
  2. Streamlined the javascript codes.

  3. v1.0.2 (for Joomla 1.0) and v1.5.2 (for Joomla 1.5)
    Released January 20, 2010
  4. v1.0.3 (for Joomla 1.0) and v1.5.3 (for Joomla 1.5)
    Released February 14, 2010
  5. 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.

  6. v1.0.4 (for Joomla 1.0) and v1.5.4 (for Joomla 1.5)
    Released May 06, 2010
  7. Conform to joomla.org guidelines.

  8. v1.0.5 (for Joomla 1.0) and v1.5.5 (for Joomla 1.5)
    Released May 16, 2010
  9. The module is now W3C XHTML 1.0 Transitional compliant.

  10. v1.6.6 (for Joomla 1.6) and v1.7.7 (for Joomla 1.7)
    Released October 10, 2011
  11. Native version of the Google Weather Module for Joomla 1.6 and 1.7!

  12. v1.6.7 (for Joomla 1.6) and v1.7.7 (for Joomla 1.7)
    Released October 16, 2011
  13. 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.

  14. 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
  15. Native version of the Google Weather Module for Joomla 2.5!

  16. 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
  17. Google has stopped its Google Weather API service entirely. Details here.

    The latest version uses the API from wunderground.com


 

Comments  

 
# Sean Lee 2012-01-23 10:05
Thanks
 
 
# Scott Alexander 2012-01-28 20:02
This is what I am searching for. I would really like to know if Google has a weather module. I'm glad that it has.
 
 
# Czech Cricket 2012-03-08 04:38
Thank you, the module was very easy to set up on our website and provides a very useful service. No problems at all so far!

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
 
 
# kksou 2012-03-09 07:14
Hi,

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
 
 
# dora 2012-03-15 15:22
I've downloaded the module(2.5, all is good on that end. Where do I fine the CSS info to make changes in the font?
thanks
 
 
# kksou 2012-03-15 17:49
Hi,

The css file is in the folder: [Joomla_root_fo lder]/modules/mod_kksouGoogle Weather

css file: mod_kksouGoogle Weather.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
 
 
# Gerardo Bredfeldt 2012-05-09 16:43
Hi, I migrate my page from Fatcow to Arvixe and your module stop working. It searches endless for the city. Arvixe has support for Php4 and 5. CURl is enabled. My Joomla is 1.5.25 and I'd install "mod_kksouGoogle Weather_v1.57.zip". Tryed twice, no success. Installed a few other free weather modules ---> ok, but I would prefer yours. Thanks for possible help.
 
 
# Toni Rauma 2012-05-11 05:35
Hi,
I have a problem with scandic letters (едц) with finnish language. The module displays them wrong and it becomes messy :/
 
 
# kksou 2012-05-11 07:19
Hi Toni,

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
 
 
# Toni Rauma 2012-05-13 23:23
I think it's a server related problem cause it seems to work on this demo site. Any suggestions how to get rid of it? :-?

Here's an URL: http://www.sivutuote.com/sivut/metsa/
 
 
# kksou 2012-05-13 23:52
Hi Toni,

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
 
 
# kksou 2012-05-13 23:57
Hi Toni ,

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 2012-05-13 13:57
Joomla 1.5.x: mod_kksouGoogle Weather_v1.57.zip
broken link. doesnt end.
 
 
# kksou 2012-05-13 17:48
Hi,

Just tested the download link. It works fine.

For your convenience, have emailed a copy of the module to you.

Regards,
/kksou
 
 
# guest2012 2012-08-16 11:29
In your demo: Warning: simplexml_load_ string() [function.simplexml-load-string]: in /home/fann/kksou.com/t1510/modules/mod_googleWeath er/mod_kksouGoogle Weather_libclas s.php on line 26 any advise on how to fix?
 
 
# kksou 2012-08-17 01:31
Hi,

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
 
 
# Jeroen 2012-08-28 08:08
Hello 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
 
 
# kksou 2012-08-28 08:22
Hi 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
 
 
# kksou 2012-08-29 10:38
Hi Jeroen,

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
 
 
# Branko 2012-09-02 09:32
Hi 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
 
 
# kksou 2012-09-02 21:50
Hi 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
 
 
# Olasunkanmi 2012-09-04 05:10
Please, on the website, we have 2 cities for lagos and i want to use it in the module.please we need to developer to fix this issue about multiple cities(Lagos, Nigeria).
 
 
# Jordi Caralt 2012-09-04 08:00
Could I get the URLs from where this modules retrieves all data? My hosting provider seems to be a bit lost configuring FW rules
 
 
# Olasunkanmi 2012-09-04 09:56
here's the Link http://http://eventsinnigeria.com/
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??
 
 
# Olasunkanmi 2012-09-04 09:58
The same problem applies on wunderground's website !
when the search form is active and you type lagos, nigeria, it brings out 2 results..that's where the problem comes from !
 
 
# Lasco 2012-09-04 23:17
I had the weather extention on alot of websites, but ofcourse this no longer work. I saw in some of the discussions the reason was that Google Weather Api is no longer operational, but that the extention now works with Wunderground.com.
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?
 
 
# kksou 2012-09-17 08:49
Hi,

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
 
 
# Rodolphe 2012-09-13 06:29
hi,
There is a mistake with the japanese language : sunday is ??? and not ??.
Can you fix it? How can i do it by myself?
thanks!
 
 
# kksou 2012-09-17 08:41
Hi,

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
 
 
# Eranda 2012-09-16 22:41
:-)
Thanks Man!
 
 
# straka 2012-09-21 01:36
Hi,
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.
 
 
# kksou 2012-09-21 01:56
Hi,

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
 
 
# SeanMS 2012-09-25 04:36
Hello!

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
 
 
# kksou 2012-09-25 05:46
Hi,

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
 
 
# SeanMS 2012-09-25 06:01
thanks for the quick reply -
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
 
 
# Branko 2012-11-02 02:11
After upgrade to 2.59 (from 2.58) I am getting the following error:

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_kksouGoogle Weather/mod_kksouGoogle Weather_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_kksouGoogle Weather/mod_kksouGoogle Weather_setup.php on line 17

Regards,
Branko
 
 
# kksou 2012-11-02 08:16
Hi 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
 
 
# Camaleon 2012-11-08 04:59
Hi,
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_kksouGoogle Weather_v1.59 version.

Any idea? Thanks!
 
 
# Branko 2012-11-20 00:39
Quote:
$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


Hi,
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
 
 
# Mikerr3 2012-12-22 08:21
I want to call different cities. The old google plugin was {weather 07465} {weather 12500} How do I call multiple cities with new module?

Thanks.
 
 
# Aaron Toth 2013-01-14 06:38
Where can we contact the team for support questions? I do not want to leave an error message here.
 
 
# kksou 2013-01-14 07:01
Hi,

You can send via the feedback form.

Regards,
/kksou
 
 
# Apesz 2013-04-09 00:46
Hello,

I need help.
I downloaded and installed mod_kksouGoogle Weather 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
 
 
# kksou 2013-04-09 01:12
Hi 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
 
 
# Apesz 2013-04-09 06:24
Hi 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)
 
 
# kksou 2013-04-09 09:15
Hi Apesz,

Have just emailed you.

Let me know if it works, ok?

Regards,
/kksou
 
 
# Guillaume Trempe 2013-04-09 09:07
module not working

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
 
 
# Guillaume Trempe 2013-04-09 09:08
Quoting Guillaume Trempe:
module not working

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/
 
 
# kksou 2013-04-09 09:15
Hi Guillaume,

Have just emailed you.

Let me know if it works, ok?

Regards,
/kksou
 
 
# Guillaume Trempe 2013-04-09 09:39
Quoting kksou:
Hi Guillaume,

Have just emailed you.

Let me know if it works, ok?

Regards,
/kksou


non not working ... module still searching
 
 
# kksou 2013-04-09 09:41
Which Joomla version are you using?

Regards,
/kksou
 
 
# Guillaume Trempe 2013-04-09 09:42
Quoting kksou:
Which Joomla version are you using?

Regards,
/kksou


Joomla! 2.5.9
 
 
# Okram 2013-04-10 12:31
Hi,

just installed latest Version to Joomla 3.0.3. Get a missing file failure:

Warning: require_once(xx xx/xxxx/modules/mod_kksouGoogle WeatherDShelper .php) [function.require-once]: failed to open stream: No such file or directory in /xxxx/xxxx/modules/mod_kksouGoogle Weather/mod_kksouGoogle Weather.php on line 16

Fatal error: require_once() [function.require]: Failed opening required '/xxxx/xxxx/modules/mod_kksouGoogle WeatherDShelper .php' (include_path='.:/usr/local/lib/php') in /xxxx/xxxx/webseiten/maasholm_303/modules/mod_kksouGoogle Weather/mod_kksouGoogle Weather.php on line 16

File's not in the modules directory! What to do?

Regards,
Marko
 
 
# kksou 2013-04-10 18:28
Hi 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_fo lder]/modules/mod_kksouGoogle Weather

2) Edit the file: mod_kksouGoogle Weather.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
 
 
# Okram 2013-04-11 12:11
Hi,

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
 
 
# kksou 2013-04-12 00:46
Hi 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
 
 
# Shabnam 2013-10-01 04:47
I have joined your rss feed and look forward to seeking more of your fantastic post. Clippinh factory india
 
 
# Shabnam 2013-10-01 04:48
I am so grateful for your blog article.Really looking forward to read more. Really Cool.http://www.clippingfactory india.com/
 
< Prev   Next >

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2015. kksou.com. All Rights Reserved