Page 179 of 216 FirstFirst ... 79129169177178179180181189 ... LastLast
Results 3,561 to 3,580 of 4318

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Widget Weather

  1. #3561
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Quote Originally Posted by NewdestinyX View Post

    Is Humidity even something that's retrieved from WW?
    Of course it is, check the xml.

  2. The Following 3 Users Say Thank You to Simon For This Useful Post:

    hemptation (2014-05-08), King_O_Hill (2014-05-07), RKO1195 (2014-05-08)

  3. #3562
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,708
    Thanks
    8,334
    Thanked 16,463 Times in 7,695 Posts

    Quote Originally Posted by Simon View Post
    Of course it is, check the xml.
    Great. Then it should be an easy code fix if I can establish this pattern.

    Code:
    if (obj.humidity <=20) && (obj.desccode == 33) {desc = "Mostly Clear"}
    else if (obj.humidity >20) && (obj.desccode == 34) {desc = "Partly Sunny"}
    else if (obj.humidity <=20) && (obj.desccode == 34) {desc = "Mostly Sunny"}
    Something like that...

  4. The Following 3 Users Say Thank You to NewD For This Useful Post:

    King_O_Hill (2014-05-07), RKO1195 (2014-05-08), Simon (2014-05-07)

  5. #3563
    Quote Originally Posted by NewdestinyX View Post
    If I can find a reliable pattern between humidity level and weather conditions 33 and 34 (Fair) with what the weather.app readout says - would you modders (King, Marty, nateD, Ferlop, MJ, etc) be willing to modify our widgets going forward to add code that checks for humidity level in correlation to Fair Day/Night code # to yield the Partly Sunny, Mostly Sunny and Mostly Clear conditions?

    Is Humidity even something that's retrieved from WW?
    Yes, if you go through the trouble, I will see to it that it gets implemented. I'm sure that Ian and Dacal won't have any issue using it in their bases.

    Great. Then it should be an easy code fix if I can establish this pattern.

    Code:
    if (obj.humidity <=20) && (obj.desccode == 33) {desc = "Mostly Clear"}
    else if (obj.humidity >20) && (obj.desccode == 34) {desc = "Partly Sunny"}
    else if (obj.humidity <=20) && (obj.desccode == 34) {desc = "Mostly Sunny"}
    Something like that...
    You got it!

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  6. The Following 3 Users Say Thank You to King_O_Hill For This Useful Post:

    hemptation (2014-05-08), RKO1195 (2014-05-08), Simon (2014-05-07)

  7. #3564
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,708
    Thanks
    8,334
    Thanked 16,463 Times in 7,695 Posts

    Quote Originally Posted by King_O_Hill View Post
    Yes, if you go through the trouble, I will see to it that it gets implemented. I'm sure that Ian and Dacal won't have any issue using it in their bases.
    Great! Thanks, King.. I'll keep a close eye on it next few days and see what that unique humidity level is over/under which the weather app is triggering a different desc name.

    What makes this even more plausible and explanation of what I'm seeing is that you never see the word FAIR in Weather.app descriptions.

    Cool. I'm on it.

    Thanks Brian, Simon & Marty for helping me to think this thru out loud.. "External processor" personality that I am....

  8. The Following 3 Users Say Thank You to NewD For This Useful Post:

    hemptation (2014-05-08), Marty McFly (2014-05-08), Simon (2014-05-07)

  9. #3565
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,708
    Thanks
    8,334
    Thanked 16,463 Times in 7,695 Posts

    Default Adding expanded conditions replacing FAIR in WW widgets
    Okay. I think I have this figured out. Though I'll take the next 7-10 days to decipher the EXACT humidity point at which Apple makes the distinction - for now - to replace the FAIR condition in any WidgetWeather UniAW6.4-based weather widgets (NOT the yahoo versus accuweather ones) this is what you do:

    In UniAW6.4.js:
    Early in code---
    Replace this in the conditions section--
    Code:
    "blank"];
    with this:
    Code:
    "blank",
    "fair",
    "fair",
    "fair",
    "clear"];
    Later in code---
    Replace this--
    Code:
    // Translation
     
     document.getElementById("desc").innerHTML = WeatherDesc[obj.icon];
    with this:
    Code:
    // Translation
    if ((obj.icon == 34) && (obj.humidity <= 20)) {obj.icon = 49};
    if ((obj.icon == 34) && (obj.humidity > 20)) {obj.icon = 50};
    if ((obj.icon == 33) && (obj.humidity > 20)) {obj.icon = 51};
    if ((obj.icon == 33) && (obj.humidity <= 20)) {obj.icon = 52}; 
     document.getElementById("desc").innerHTML = WeatherDesc[obj.icon];
    In translation.js:
    For each language that needs translation - look for case: default (which is the English)
    And replace this:
    Code:
    "Not Available"];		  
    break;
    with this:
    Code:
    "Not Available",
    "Mostly Sunny",
    "Partly Sunny",
    "Mostly Clear",
    "Clear"];		  
    break;
    Works like a charm! Enjoy!

  10. The Following 5 Users Say Thank You to NewD For This Useful Post:

    hemptation (2014-05-08), lostinthemes (2014-05-08), menard_00 (2014-05-09), RKO1195 (2014-05-08), Simon (2014-05-08)

  11. #3566
    Throw me a zip of the Js I'm at work and would like to check it coming home tonight, I've never had clear at my home in weather app but I have seen it in other city's

  12. The Following User Says Thank You to RKO1195 For This Useful Post:

    hemptation (2014-05-08)

  13. #3567
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,708
    Thanks
    8,334
    Thanked 16,463 Times in 7,695 Posts

    Quote Originally Posted by RKO1195 View Post
    Throw me a zip of the Js I'm at work and would like to check it coming home tonight, I've never had clear at my home in weather app but I have seen it in other city's
    For those who don't want to manually add stuff - here's a link to the two files you need to replace to get rid of Fair condition. Don't forget to rename the files you have now by adding a '1' to the end of the name prior to the .js - so you can get the originals back if you need them. These were modded from the UniAW.6.4_LS. Should work in most UniAW (WidgetWeather) - based widgets.. but each modder has subtle things they change.. Ask questions here. Don't PM me. This will not help with yahoo/accuweather choice mods.

    Replace_Fair_condition

  14. The Following 5 Users Say Thank You to NewD For This Useful Post:

    hemptation (2014-05-08), King_O_Hill (2014-05-08), Marty McFly (2014-05-08), menard_00 (2014-05-09), RKO1195 (2014-05-08)

  15. #3568
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Should probably make that edit to the main.js in the base WW LS from the first post. A lot of people's non-uniaw WW widgets are based on that one. Nice job btw Grant

  16. The Following 4 Users Say Thank You to Simon For This Useful Post:

    hemptation (2014-05-08), King_O_Hill (2014-05-08), Marty McFly (2014-05-08), RKO1195 (2014-05-08)

  17. #3569
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,708
    Thanks
    8,334
    Thanked 16,463 Times in 7,695 Posts

    Quote Originally Posted by Simon View Post
    Should probably make that edit to the main.js in the base WW LS from the first post. A lot of people's non-uniaw WW widgets are based on that one. Nice job btw Grant
    Thanks, Simon.

    You mean Durben's original? I can do that one later tonight too.

  18. The Following 3 Users Say Thank You to NewD For This Useful Post:

    hemptation (2014-05-08), King_O_Hill (2014-05-08), Simon (2014-05-08)

  19. #3570
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Quote Originally Posted by NewdestinyX View Post
    Thanks, Simon.

    You mean Durben's original? I can do that one later tonight too.
    Ya, the base one in the first post that shows all items that WW can show. Not sure if Durben or Dacal did it (prob both of them had a hand in it). A lot of people have used that one to build various LS up from, I know I have lol. Won't get a chance to look at it myself til later tonight.

  20. The Following 3 Users Say Thank You to Simon For This Useful Post:

    hemptation (2014-05-08), King_O_Hill (2014-05-08), Marty McFly (2014-05-08)

  21. #3571
    We need to do Dacals Yahoo 2.6 too.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  22. The Following User Says Thank You to King_O_Hill For This Useful Post:

    RKO1195 (2014-05-08)

  23. #3572

  24. #3573
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Question, what happens if the conditions meet your criteria above which leads to a mostly sunny or partly sunny condition, but it happens to be night time?

  25. #3574
    Awesome work Grant but I think making all of these changes right away is a little 'jumping the gun'. It's great that you figured out the code to do it but we don't even know if humidity has anything to do with the description. I know I suggested it earlier but it was just a thought. Until we actually 'know' something, I'm just not sure making the change right now is the right step. That "20" humidity level in your code, is that just an arbitrary number? Don't get me wrong, I'm all for seeing a wider range of descriptions, just don't want to make a change too fast without knowing the facts. I think if we dig with a little more research, we should be able to uncover some more info. Just my two cents.

    Quote Originally Posted by Simon View Post
    Question, what happens if the conditions meet your criteria above which leads to a mostly sunny or partly sunny condition, but it happens to be night time?
    This code exists in most widgets to make up for Yahoo's ignorance with displaying daytime codes at night and vice versa.....

    Code:
    function AdjustIcon(icon, whereTmp) {
    	switch(whereTmp) {
    		case "day":
    			if (icon == 27) { icon = 28; }
    			if (icon == 29) { icon = 30; }	
    			if (icon == 31) { icon = 32; }	
    			if (icon == 33) { icon = 34; }
    		break;
    		case "night":
    			if (icon == 28) { icon = 27; }
    			if (icon == 30) { icon = 29; }	
    			if (icon == 32) { icon = 31; }	
    			if (icon == 34) { icon = 33; }
    		break;
    	}
    	return icon;
    }
    We can easily alter it to include Grants new "icon codes". Basically just telling it that if the "mostly sunny" or "partly sunny" conditions appear after sunset, change to the "clear" condition.......something like that anyway.

  26. The Following 4 Users Say Thank You to Marty McFly For This Useful Post:

    Dacal (2014-05-08), hemptation (2014-05-09), NewD (2014-05-08), Simon (2014-05-08)

  27. #3575
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Maybe this is something we can ask Stephen to look into. He's the one that did the code to pull the info, maybe he can dig into it a little to see if there are any conditions there that can shed some light on how the weather app gets the various descriptions.

  28. The Following 2 Users Say Thank You to Simon For This Useful Post:

    hemptation (2014-05-09), Marty McFly (2014-05-08)

  29. #3576
    Quote Originally Posted by Simon View Post
    Maybe this is something we can ask Stephen to look into. He's the one that did the code to pull the info, maybe he can dig into it a little to see if there are any conditions there that can shed some light on how the weather app gets the various descriptions.
    I've asked him something very similar, but will word it this way.

    Marty,

    I don't really mind making the changes for now. We can always alter / tweak it as we learn more. But we might as well enjoy something along the way.
    Last edited by King_O_Hill; 2014-05-08 at 02:45 AM.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  30. The Following 5 Users Say Thank You to King_O_Hill For This Useful Post:

    Dacal (2014-05-08), hemptation (2014-05-09), Marty McFly (2014-05-08), NewD (2014-05-08), Simon (2014-05-08)

  31. #3577
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,708
    Thanks
    8,334
    Thanked 16,463 Times in 7,695 Posts

    I hear you Marty, for sure, bro. I have no agenda here but to help. I would certainly love to know the criteria Apple uses.. Though I'm darn sure it's humidity level that's the determining factor. Unless they're using a whole different desc number table. Doubt that given what we see in the XML now.


    As to Evening.. Code 33 in a Night Fair and code 34 is Day fair.. So that's easy to figure. The word Clear is only used at night. Daytime Sunny is used for no clouds at all..

    I will offer what I can on these other mods mentioned. I personally am not willing to wait on the mods on my phone.. to get rid of fair and make it match weather.app.. But we don't have to change post 1 yet.. ..
    Last edited by NewD; 2014-05-08 at 03:14 AM.

  32. The Following 2 Users Say Thank You to NewD For This Useful Post:

    hemptation (2014-05-09), Marty McFly (2014-05-08)

  33. #3578
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Quote Originally Posted by NewdestinyX View Post


    As to Evening.. Code 33 in a Night Fair and code 34 is Day fair.. So that's easy to figure. The word Clear is only used at night. Daytime Sunny is used for no clouds at all..
    Ya, realized that after. We wouldn't be on the initial code for sunny if it was night. Silly me lol. Have it up and running on my DCL slideshow LS. Tested a few conditions by changing the xml and all seemed to work ok, was a little easier adding your code to the base WW main.js and translation.js, little bit less complicated than uniaw.

  34. The Following 3 Users Say Thank You to Simon For This Useful Post:

    hemptation (2014-05-09), King_O_Hill (2014-05-08), Marty McFly (2014-05-08)

  35. #3579
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,708
    Thanks
    8,334
    Thanked 16,463 Times in 7,695 Posts

    Quote Originally Posted by Simon View Post
    Ya, realized that after. We wouldn't be on the initial code for sunny if it was night. Silly me lol. Have it up and running on my DCL slideshow LS. Tested a few conditions by changing the xml and all seemed to work ok, was a little easier adding your code to the base WW main.js and translation.js, little bit less complicated than uniaw.
    Cool. Can you send me those changed files?

    And I'll tackle Dacal 2.6 when I get home in 30.. Unless someone's already done the work..

    And then, of course, there's the hard job of finding all the translations for Partly Sunny, Mostly Sunny, and Mostly Clear.

    And by all means, let's ask Steven if he can look at Apple's code and discover where they're deriving these three other conditions from.
    Last edited by NewD; 2014-05-08 at 03:20 AM.

  36. The Following 3 Users Say Thank You to NewD For This Useful Post:

    hemptation (2014-05-09), Marty McFly (2014-05-08), Simon (2014-05-08)

  37. #3580
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Quote Originally Posted by NewdestinyX View Post
    Cool. Can you send me those changed files?

    And I'll tackle Dacal 2.6 when I get home in 30.. Unless someone's already done the work..

    And then, of course, there's the hard job of finding all the translations for Partly Sunny, Mostly Sunny, and Mostly Clear.

    And by all means, let's ask Steven if he can look at Apple's code and discover where they're deriving these three other conditions from.
    Here ya go: https://dl.dropboxusercontent.com/u/6380940/Archive.zip

    Ones here are mostly the same as the ones in the WW Base, except the main.js has a little extra code in it where I added Dacals slideshow code.

  38. The Following 3 Users Say Thank You to Simon For This Useful Post:

    Marty McFly (2014-05-08), NewD (2014-05-08), RKO1195 (2014-05-08)

Page 179 of 216 FirstFirst ... 79129169177178179180181189 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •