Elxis CMS Forum

Extensions => Modules => Topic started by: aiden11 on August 20, 2010, 21:21:51

Title: AccuWeather adding more cities
Post by: aiden11 on August 20, 2010, 21:21:51
Hello,

I would like to add more destinations to AccuWeather but dont know how

<option value="EUR|IT|IT012|TORINO">Italy - Torino</option>

For example if i want to add a city in Lithuania where do i find the "LT00" number?

Thanks
Title: Re: AccuWeather adding more cities
Post by: datahell on August 21, 2010, 13:32:40
Look at accuweather.com web site

For example, Lithuania - Kaunas:
http://www.accuweather.com/en-us/lt/kaunas/kaunas/quick-look.aspx (http://www.accuweather.com/en-us/lt/kaunas/kaunas/quick-look.aspx)
EUR|LT|LH013|KAUNAS

It is better to search in their RSS section (Choose a location -> example: Kaunas,LT and click "SET"):
http://www.accuweather.com/rss-center.asp (http://www.accuweather.com/rss-center.asp)
Title: Re: AccuWeather adding more cities
Post by: aiden11 on August 21, 2010, 16:58:50
Thank you "datahell" all sorted now, thanks to Stavros :)
Title: Re: AccuWeather adding more cities
Post by: bgkres on March 26, 2012, 06:10:37
Hello I am trying to determine the area code for the following link in accuweather site:

http://www.accuweather.com/en/br/barra-grande/40563/weather-forecast/40563

BEst I could come up was:

BRZ | BR | BR40563 | BARRA-GRANDE

Can anyone help ???
Title: Re: AccuWeather adding more cities
Post by: bgkres on March 26, 2012, 21:39:09
Allright, I was able to figure out the custom area code:

SAM|BR|BR016|BARRA GRANDE

But it´s not giving out the weather, check www.piauibarragrade.com

Help?
Title: Re: AccuWeather adding more cities
Post by: datahell on March 27, 2012, 20:52:48
Your server strips out vertical lines "|" so this: "SAM|BR|BR016|BARRA GRANDE" becomes this: "SAMBRBR016BARRA GRANDE" after save. This is why it doesn't work. I will release a new version that will accept commas "," instead of "|". Please wait some minutes.
Title: Re: AccuWeather adding more cities
Post by: datahell on March 27, 2012, 21:51:09
I released AccuWeather v1.3 thats also supports commas "," instead of vertical lines "|".
Your correct zip code is: SAM|BR|BR005|BARRA+GRANDE (in your case written as SAM,BR,BR005,BARRA+GRANDE)
Note the plus "+" between the words, no spaces allowed.
I installed it in your site and now it works fine: http://www.piauibarragrande.com/ (http://www.piauibarragrande.com/)

You can find any zip code from here: http://netweather.accuweather.com/ (http://netweather.accuweather.com/)
Title: Re: AccuWeather adding more cities
Post by: bgkres on March 27, 2012, 22:21:00
Many thanks !!!!

 ;D ;D ;D ;D ;D
Title: Re: AccuWeather adding more cities
Post by: azmi2 on November 10, 2012, 08:53:50
i need to add more city to get weather information.can any body guide me how i could add more city in same country.quick reply appreciated.

thanks
Title: Re: AccuWeather adding more cities
Post by: datahell on November 10, 2012, 11:13:19
You can add more cities by modifying the extension's XML file.
Off course you must first find the zip codes for the locations you are interested in. Check my previous posts for this.
Title: Re: AccuWeather adding more cities
Post by: azmi2 on November 11, 2012, 09:57:21
I TRIED IN .XML EXTENSION TO PUT AS OPTION AS FOLLOWS,BUT COULD NOT GET ANSWER

---------------------------------------------------------------------------------------------------------------------------------
<params>
     <param name="moduleclass_sfx" type="text" dir="ltr" default="" label="AX_SM_MCSL" description="AX_SM_MCSD" />
      <param name="areacode" type="list" default="MEA,SA,SA007,RIYADH" dir="ltr" label="CX_ACCU_LOC" description="CX_ACCU_LOCD">
      
         <option value="MEA,SA,SA011,MAKKAH">MAKKAH - SAUDI ARABIA</option>
 
          <option value="MEA,SA,SA011,JEDDAH">JEDDAH - SAUDI ARABIA</option></param>
------------------------------------------------------------------------------------------------------------------------------------

CAN YOU PLEASE GUIDE ME HOW WE CAN ADD MORE CITY,I MEAN HOW AND WHERE I CAN PUT COMMAND FOR OTHER CITY.

THANKS
Title: Re: AccuWeather adding more cities
Post by: datahell on November 11, 2012, 12:54:49
Open the XML file mod_accuweather.xml and find this:
<param name="areacode" type="list" default="EUR,GR,GR007,ATHENS" dir="ltr" label="CX_ACCU_LOC" description="CX_ACCU_LOCD">
At the end of the list (below Kiev, Ukraine) add this:
<option value="MEA,SA,SA011,JEDDAH">Jeddah, Saudi Arabia</option>
<option value="MEA,SA,SA011,MAKKAH">Makkah, Saudi Arabia</option>
After these the closing tag should follow:
</param>
Save XML and you are ready. It should work fine.

The module uses cache. You may need to delete the cached file to new the changes.
The cache file is named like this:
cache/mod_accuweather/accu_xxxxxxxx.xml
or this:
cache/mod_accuweather_ssl/accussl_xxxxxxxx.xml
Title: Re: AccuWeather adding more cities
Post by: azmi2 on November 11, 2012, 13:32:46
thanks,but it is not working,i put module in left bar,it give weather only for RIYADH not other city.please give me some more info.


thanks
Title: Re: AccuWeather adding more cities
Post by: datahell on November 11, 2012, 13:42:19
There are no more info. The data I gave you are correct.

MEA,SA,SA011,MAKKAH
<local><ufdb>MECA</ufdb><city>Makkah</city><state>Makkah Saudi Arabia</state><lat>21.42</lat><lon>39.83</lon><time>14:50</time><gmtdiff daylightsavings="0">3.00</gmtdiff></local>
<currentconditions>...<temperature>36</temperature>...</currentconditions>

MEA,SA,SA011,JEDDAH
<local><ufdb>SDALA2</ufdb><city>Jeddah</city><state>Makkah Saudi Arabia</state><lat>21.51</lat><lon>39.21</lon><time>14:50</time><gmtdiff daylightsavings="0">3.00</gmtdiff></local>
<currentconditions>...<temperature>33</temperature>...</currentconditions>

Title: Re: AccuWeather adding more cities
Post by: azmi2 on November 12, 2012, 07:26:33
actually i want to display weather more than one city on same time,or can be drop down city list that user can choose a city to see weather information
Title: Re: AccuWeather adding more cities
Post by: datahell on November 12, 2012, 09:02:45
Why dont you say that from the beggining? Just copy the module then! The first module will display the weather for the first city and the second one for the second city. Note that I haven't checked if it will work correctly in this case as there might be a javascript conflict between the 2 instances of the module. Test it.
Title: Re: AccuWeather adding more cities
Post by: azmi2 on November 12, 2012, 12:06:51
after copying module,it will work perfectly,but how many times i should copy.if any body want to display 10 cities,then how we can accommodate.i am thinking for drop down list of cities,that user can select any city and get weather information.is it possible in this module.
Title: Re: AccuWeather adding more cities
Post by: webgift on November 12, 2012, 12:24:02
You can either copy this module as much times as you want or you can use Weather component (http://www.elxis-downloads.com/downloads/weather/320.html).
Title: AccuWeather for Elxis 4.x
Post by: datahell on November 25, 2012, 22:06:53
Accuweather is now available for Elxis 4.x too!
The module has been re-designed and improved due to the advanced Elxis 4.x features.
Download Accuweather v1.4 from Elxis 4.x live EDC page.
Title: Re: AccuWeather adding more cities
Post by: webgift on November 26, 2012, 10:41:07
Bravo John! Nice...