1. wyndwarrior's Avatar

    A lot of people have been asking for a live weather plugin for this amazing theme, so I decided to make one.

    DUSK Evolution with LIVE Weather [4.0 & iP4]

    Compatable with your Favorite Clock Widgets (HTC, iClocktopia, Dusk LCD, etc.)

    Live Weather on your HomeScreen (works stand-alone for other themes as well)

    Download Here. And this widget will be free, courtesy to ALIEN for making the animations.

    So a lot of people are confused as to how the conditions are determined and how to set your own weather condition (ex. nothing for fair)

    Here's how it works:

    Weather request sent -> Yahoo weather
    Yahoo weather responds -> obj.icon returns the current condition
    obj.icon is put into -> an array that determines the condition to display

    If you open functions.js, half way down you should see a Conditions array:
    PHP Code:
    var Conditions = ["thunderstorm","rain","rain","thunderstorm","thunderstorm","rain","rain","snow","snow","rain","snow","rain","rain","snow","snow","snow","snow","snow","snow","fog","fog","fog","fog","cloud","cloud","cloud","cloud","cloud","cloud","cloud","cloud","sun","sun","fog","fog","rain","sun","thunderstorm","thunderstorm","thunderstorm","thunderstorm","snow","snow","snow","cloud","thunderstorm","snow","thunderstorm","blank"]; 
    It should look something like that ^

    Now, obj.icon returns a number and this number is one of those conditions in the list above. If it returned 0 then you would have thunderstorms, if it returned 10 then you would have snow. (index for JavaScript arrays start from 0)

    So if you were to change the first string in the array to rain, then you would get rain instead of thunderstorms. Simple?

    All you need to know now are the original conditions that the weather source returns in order to change whichever condition you want to display on Dusk LAW.

    PHP Code:
    //these are the original conditions
    var MiniIcons =
    "tstorm3",        //0    tornado
    "tstorm3",        //1    tropical storm
    "tstorm3",        //2    hurricane
    "tstorm3",        //3    severe thunderstorms
    "tstorm2",        //4    thunderstorms
    "sleet",        //5    mixed rain and snow
    "sleet",        //6    mixed rain and sleet
    "sleet",        //7    mixed snow and sleet
    "sleet",        //8    freezing drizzle
    "light_rain",        //9    drizzle
    "sleet",        //10    freezing rain
    "shower2",        //11    showers
    "shower2",        //12    showers
    "snow1",        //13    snow flurries
    "snow2",        //14    light snow showers
    "snow4",        //15    blowing snow
    "snow4",        //16    snow
    "hail",     //17    hail
    "sleet",        //18    sleet
    "mist",     //19    dust
    "fog",               //20    foggy
    "fog",               //21    haze
    "fog",               //22    smoky
    "cloudy1",        //23    blustery
    "cloudy1",        //24    windy
    "overcast",        //25    cold
    "cloudy1",        //26    cloudy
    "cloudy4_night",    //27    mostly cloudy (night)
    "cloudy4",        //28    mostly cloudy (day)
    "cloudy2_night",    //29    partly cloudy (night)
    "cloudy2",        //30    partly cloudy (day)
    "sunny_night",    //31    clear (night)
    "sunny",        //32    sunny
    "mist_night",        //33    fair (night)
    "mist",     //34    fair (day)
    "hail",     //35    mixed rain and hail
    "sunny",        //36    hot
    "tstorm1",        //37    isolated thunderstorms
    "tstorm2",        //38    scattered thunderstorms
    "tstorm2",        //39    scattered thunderstorms
    "tstorm2",        //40    scattered showers
    "snow5",        //41    heavy snow
    "snow3",        //42    scattered snow showers
    "snow5",        //43    heavy snow
    "cloudy1",        //44    Gedeeltelijk Bewolkt
    "storm1",        //45    thundershowers
    "snow2",        //46    snow showers
    "tstorm1",        //47    isolated thundershowers
    "dunno",        //3200    not available

    As you can see, fair is number 33 and 34. If you wanted fair to display as blank then go back into functions.js where you have the Conditions array and count to the 34th and 35th values (remember you start from 0) and change "fog" to "blank".

    The resulting array would look something like this:
    PHP Code:
    var Conditions = ["thunderstorm","rain","rain","thunderstorm","thunderstorm","rain","rain","snow","snow","rain","snow","rain","rain","snow","snow","snow","snow","snow","snow","fog","fog","fog","fog","cloud","cloud","cloud","cloud","cloud","cloud","cloud","cloud","sun","sun","blank","blank","rain","sun","thunderstorm","thunderstorm","thunderstorm","thunderstorm","snow","snow","snow","cloud","thunderstorm","snow","thunderstorm","blank"]; 
    Once you update functions.js copy it to Dusk LAW (Add-on) and DUSK LAW (stand-alone). However if you changed "cloud" or "thunderstorm" then you will also have to edit the functions.js in Dusk LAW (Part 2) to match the one in the add-on version.

    Part 2 is different, it only has clouds and thunderstorms

    PHP Code:
    var Conditions = ["thunderstorm","","","thunderstorm","thunderstorm","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","blank","cloud","cloud","cloud","cloud","cloud","cloud","cloud","cloud","blank","blank","blank","blank","blank","blank","thunderstorm","thunderstorm","thunderstorm","thunderstorm","blank","blank","blank","cloud","thunderstorm","blank","thunderstorm","blank"]; 
    Part 2 conditions ^

    If you changed a cloud condition in part one to something else, then you would also have to change the cloud condition in part 2 to to "blank". Same with thunderstorms. If you changed a condition to "cloud" in part 1 then you will also have to change same condition from "blank" to "cloud"

    I hope this clears everything up, if you have more questions, feel free to post.

    Also, I am working on a css wiper animation. (which I'm hoping to complete by 10/9/10) And it will be released as an update to Dusk LAW, free of charge
    Attached Images [BETA] Dusk - LIVE Animated Weather [LAW]-preview.png 
    Last edited by wyndwarrior; 2010-10-03 at 12:09 AM.
    2010-09-18 11:27 PM
  2. tigrou85's Avatar
    Hello i have iphone 4 ready for test if you want )
    2010-09-18 11:30 PM
  3. blast123's Avatar
    ill test
    2010-09-18 11:31 PM
  4. guitarfreak26's Avatar
    I'll test, I had aliens hd2 theme on my 3GS before
    2010-09-18 11:34 PM
  5. bigco504's Avatar
    hey i love it i've been waiting for some live animated weather i would love to test it
    2010-09-18 11:48 PM
  6. AnthonyGiola's Avatar
    lmao he bolded it! :P
    Great job wynd! Nice to see you back!
    Oh and I was wondering how well does backboard work on iP4/ iOS4?
    2010-09-19 12:07 AM
  7. ziggy7's Avatar
    Ooooooommmmmmggggggg!!!!! am i really seeing this right lol


    Truly great work wyndwarrior

    Wait till Alien see's this..he'll be mega impressed
    Last edited by ziggy7; 2010-09-19 at 12:19 AM.
    2010-09-19 12:12 AM
  8. zyzz's Avatar
    i'm willing to test out with my iphone 4. looks awesome!
    2010-09-19 12:39 AM
  9. wyndwarrior's Avatar
    I will be sending beta's tomorrow. Unfortunately the plug-in will only work if you are living in the US, unless I can fix the zip-code issue today.
    2010-09-19 01:43 AM
  10. Tru4lyfe's Avatar
    I'll also test if you need anyone else
    2010-09-19 01:46 AM
  11. aimetti's Avatar
    If you need some more testers for i4 shoot me a message. I'll gladly test for you.
    2010-09-19 01:51 AM
  12. monchy36's Avatar
    Got one too ready to text when you are!!!
    2010-09-19 02:06 AM
  13. jon347's Avatar
    I'll test it out if you need more testers
    2010-09-19 02:32 AM
  14. renegade12's Avatar
    if your still looking for beta testers im up for it. been using iHY HD for a lil bit now, very awsome.
    2010-09-19 03:12 AM
  15. joe97's Avatar
    I'll beta test this, looks great--
    2010-09-19 05:20 AM
  16. chrisrotolo's Avatar
    Will this include wipers, thunder, falli g rain plug-ins, big sunbursts?? Does it lag??
    2010-09-19 08:00 AM
  17. Pherball66's Avatar
    I can beta test it for ya also.
    2010-09-19 12:33 PM
  18. can7's Avatar
    i can also beta test for iphone 4
    2010-09-19 03:00 PM
  19. wyndwarrior's Avatar
    Will this include wipers, thunder, falli g rain plug-ins, big sunbursts?? Does it lag??
    No lag. No wipers since there weren't any in Dusk Evolution. Includes: sunshine, rain, clouds, thunder, fog, and snow.
    2010-09-19 04:14 PM
  20. FreeApple's Avatar
    Wynd your freakin awsome man! I have been trying to get the actual plug in that Alien made to work since day 1 with no luck....cant wait to see what you came up with! Will this eventually work on non retnia devices?
    2010-09-19 06:50 PM
377 12311 ...
We have updated our Privacy Policy and Terms & Conditions. Please check them out.