Fixing GisMeteo Gadget

Published on July 07, 2009

Fixing GisMeteo Gadget

    As many already know, recently Gismeteo.ru closed its project informer.gismeteo.ru . As a result of these events, the previous weather export in XML format stopped working. However, not only webmasters suffered, but also ordinary users who have the GisMeteo gadget installed. In recent days, they have been observing such a sad picture.

    image
    I also watched it until I got tired. It just turned out to be some free time and I decided to try to fix it.

    It turned out that Gismeteo.ua is rendering XML in the old way (at least for now). I decided to use this.

    So, in order:

    1. First, download the gadget from gallery.live.com/liveItemDetail.aspx?li=7873de84-58f6-4842-a8f9-466461a2040e

    2. Rename the loaded GisMeteo_black.gadget to GisMeteo_black.gadget .zip and

    3. All we need is the contents of the js folder. First, go to js \ weatherData.js and change line 12
    req.open("GET", "http://informer.gismeteo.ru/xml/"+location+"_1.xml", false);

    on
    req.open("GET", "http://informer.gismeteo.ua/xml/"+location+"_1.xml", false);

    It would seem that everything, but it is not. The fact is that by default the gadget is configured for St. Petersburg (they were lucky), while the rest will have to suffer a little more.

    4. In the js \ weather.js file at the very top are the default settings.

    var location="26063";
    var locationName="Санкт-Петербург";

    The easiest option is to enter your city there, however, there is an ambush. As can be seen from line 25 js \ settings.js

    req.open("GET","http://bar.gismeteo.ru/gmbartlist.xml",false);

    the list of cities is loaded from inaccessible URL. Saved as always google cache :) The restored list of cities is now available here gismeteo.googlecode.com/svn/trunk/gmbartlist.xml

    5. Now it’s enough to replace js \ settings.js in line 25

    req.open("GET","http://bar.gismeteo.ru/gmbartlist.xml",false);

    on
    req.open("GET","http://gismeteo.googlecode.com/svn/trunk/gmbartlist.xml",false);


    6. We pack it back into zip, rename it to GisMeteo_black.gadget, set it, select your city in the settings (the settings dialog does not open right away, you need to wait a little while js parses xml) and enjoy :)

    image

    ps the working gadget can be downloaded here

    * This source code was highlighted with Source Code Highlighter.


    upd: now xml is not available through gismeteo.ua xml
    upd2: xml has become available with gismeteo.ru