1. NewD's Avatar
    B

    Hi NewD
    I try it, see if i can do this.
    Thanks bro.
    I made one error, Platini.. To find the zip in the updateWeather function.. you need to look for 'uzip' not 'postal zip'.. So - like this:

    obj.Yzip = $(this).find('uzip').text();

    ..That one gets you the shorter 5 character zip code.. If you like the longer one with the 4 extra numbers (XXXXX-zzzz) then you'd search for 'postal' like this:
    obj.Yzip = $(this).find('postal').text();
    2016-01-29 04:05 PM
  2. NewD's Avatar
    Ian.. Couple other things..

    1) On computer or on phone.. the new code doesn't show Additional Locations when you have a GOOD xml file - fully populated. I made sure all my widgetweather-1.xml, -2, etc were also 'good' xmls for my test. So something's gotten broken there. Your code, to my amateur eye, looks good to me, though.. So a little baffled.

    2)The LimeGreen class name is still firing for Yaddress even when using a GOOD xml..


    Also - till baffled why I can't see any walls when opened in TacoHTMLEdit. Redownloaded from Page 1 and still they don't work for me on computer using GOOD or BAD xmls in the test_files folder. Stumped. Walls totally working for you (In Taco), right?
    Last edited by NewD; 2016-01-29 at 04:45 PM.
    2016-01-29 04:32 PM
  3. <Ian Nicoll/>'s Avatar
    Try from post 1 again, I completely changed the code & updated all the links in post 1.

    I canot give instructions as the forum won't let me add code to a post for some reason.

    Yes all walls working for me.
    Are you sure you are using LockBackground.html as the reference?
    Last edited by <Ian Nicoll/>; 2016-01-29 at 05:13 PM.
    2016-01-29 05:08 PM
  4. Clem-Clone's Avatar
    Clem, do you have a link to this mod that you haven't played with? i.e. the original mod. Thanks.
    I think this is it. Post #7115

    http://modmyi.com/forums/iphone-6-th...ml#post7317704
    2016-01-29 05:17 PM
  5. NewD's Avatar
    Try from post 1 again, I completely changed the code & updated all the links in post 1.

    I canot give instructions as the forum won't let me add code to a post for some reason.

    Yes all walls working for me.
    Are you sure you are using LockBackground.html as the reference?
    Link in Post 1 is giving me a 403 forbidden error, Ian.
    2016-01-29 05:30 PM
  6. <Ian Nicoll/>'s Avatar
    Link in Post 1 is giving me a 403 forbidden error, Ian.
    All working for me, I just tested them all.
    2016-01-29 05:46 PM
  7. NewD's Avatar
    All working for me, I just tested them all.
    Well bugger.... Not working here.. On 3 different computers and phone all checked.. On computers it just keeps spinning saying "waiting for modmyi dropbox redirect".. On the phone it says 403 forbidden.. Just downloaded 2 other things from other's links here and all went perfectly. Something's up with this particular link.. weird..

    Can you email just the new main.js for the full version to [email protected], please?

    Thx..
    2016-01-29 06:16 PM
  8. <Ian Nicoll/>'s Avatar
    Well bugger.... Not working here.. On 3 different computers and phone all checked.. On computers it just keeps spinning saying "waiting for modmyi dropbox redirect".. On the phone it says 403 forbidden.. Just downloaded 2 other things from other's links here and all went perfectly. Something's up with this particular link.. weird..

    Can you email just the new main.js for the full version to [email protected], please?

    Thx..
    Attached here.

    Take out the extra div's in html files & css (yCity & Yaddress), they are not required anymore.
    Attached Files
    2016-01-29 06:28 PM
  9. NewD's Avatar
    2016-01-29 06:33 PM
  10. NewD's Avatar
    Ian.. With the config.js switch set to Neighborhood and using a bad xml (call to Yahoo automatic) I'm not seeing my city name - since I don't live in a neighborhood.

    I think this is the area from the new Ycity () function:

    Code:
    var cityname = obj.Ycity;
    switch (UseExtraLocation) {
    	case "city":
    		cityname = obj.Ycity;
    	break;
    	case "neighborhood":
    		cityname = obj.Yneigh;
    	break;
    }
    Don't we need this back (from the last main.js) to auto detect neighborhood in the new function?
    Code:
    var cityname = obj.Ycity;
    switch (UseExtraLocation) {
    	case "city":
    		cityname = obj.Ycity;
    	break;
    	case "neighborhood":
    		if (obj.Yneigh != "") { cityname = obj.Yneigh;}
                    else { cityname = obj.Ycity; }
    	break;
    }
    Or did you choose to get rid of that auto-detect element? Your call of course.
    Last edited by NewD; 2016-01-29 at 08:48 PM.
    2016-01-29 07:06 PM
  11. NewD's Avatar
    Ian's brilliant code redo inspired me to make a Mod for those of you still asking for Google rather than Yahoo. But I went a step further and gave you a choice. Ian and Dacal have always been about giving us choices. So just use the COMBOmain.js attached below and put it in the UniAW7.1/Javascript folder. Rename your existing main.js to main-Ian.js and then rename this one to main.js.

    After that you just need to add 1 line to the config.js (or config_iWidget.js).
    Code:
    var GoogleBackup = true; // true for Google API when WW2 goes down; false for New Yahoo API when WW2 goes down
    Leave your "UseExtraLocation" switch set to "neighborhood" so it auto detects if you're traveling through or in a neighborhood. If you aren't it will use city.

    That's all there is to it. It occurred to me that Yahoo's newer feed could also go down - but I've never had Google go down. So we have three-way protection now.

    Enjoy!
    Grant
    COMBOmain.js

    EDITED: Updated a couple of minor things 1/29 3pm.
    Last edited by NewD; 2016-01-30 at 05:03 AM. Reason: updated file
    2016-01-29 08:43 PM
  12. Glawrence33's Avatar
    Ian's brilliant code redo inspired me to make a Mod for those of you still asking for Google rather than Yahoo. But I went a step further and gave you a choice. Ian and Dacal have always been about giving us choices. So just use the COMBOmain.js attached below and put it in the UniAW7.1/Javascript folder. Rename your existing main.js to main-Ian.js and then rename this one to main.js.

    After that you just need to add 1 line to the config.js (or config_iWidget.js).
    Code:
    var GoogleBackup = true; // true for Google API when WW2 goes down; false for New Yahoo API when WW2 goes down
    Leave your "UseExtraLocation" switch set to "neighborhood" so it auto detects if you're traveling through or in a neighborhood. If you aren't it will use city.

    That's all there is to it. It occurred to me that Yahoo's newer feed could also go down - but I've never had Google go down. So we have three-way protection now.

    Enjoy!
    Grant
    COMBOmain.js

    EDITED: Updated a couple of minor things 1/29 3pm.
    Thanks Grant, this is great!
    2016-01-29 11:49 PM
  13. Max_Pa1n's Avatar
    Hey guys wanted to know if there was any hope for much older uniAW mods say from 6.4 or below pre ExtraLocation function using new yahoo feed?A lot has been posted on using the new feed so if this has been touched on already and I missed it my apologies.Such amazing stuff that continues to go on in this thread bravo you guys
    2016-01-30 02:54 AM
  14. Max_Pa1n's Avatar
    Not sure I completely agree here. First, "nobody's using it" on iOS9, because it's not updated yet.. UniAW7 And if it were, those on 2GB RAM phones would likely not feel the need for it and the stability of WKWebView that only g+ offers. But people still on 6/6+ phones are screwed without g+ on 9 if they want to use UniAW7 with any level of animation turned on. Hell I was even able to make my 6S+ Respring using timed walls on LS and in an iWidget on SB..
    Yup I'm one of those people on 6+ who are screwed lol...which is why the only uniAW stuff I can run are 6.4 and below on lhtml4.Actually have resorted to using LSs from when we had the split yahoo and accuweather js lol.
    2016-01-30 03:08 AM
  15. TiLT1oNE's Avatar
    Attached here.

    Take out the extra div's in html files & css (yCity & Yaddress), they are not required anymore.
    Hi Ian,

    thx alot, but I tried that with Chevys Blur UNiAW LS, and it didnt work. The screen goes black with this main.js.
    2016-01-30 03:22 AM
  16. <Ian Nicoll/>'s Avatar
    Hey guys wanted to know if there was any hope for much older uniAW mods say from 6.4 or below pre ExtraLocation function using new yahoo feed?A lot has been posted on using the new feed so if this has been touched on already and I missed it my apologies.Such amazing stuff that continues to go on in this thread bravo you guys
    Max, please give me a link to the exact 6.4 version you want updated. Thanks
    Last edited by <Ian Nicoll/>; 2016-01-30 at 05:01 AM.
    2016-01-30 04:19 AM
  17. <Ian Nicoll/>'s Avatar
    Hi Ian,
    thx alot, but I tried that with Chevys Blur UNiAW LS, and it didnt work. The screen goes black with this main.js.
    The code differs for that widget, I tried to post tutorial yesterday but the forum wouldn't let me post code, I'll try again later.
    2016-01-30 04:22 AM
  18. bliken's Avatar
    Ian's brilliant code redo inspired me to make a Mod for those of you still asking for Google rather than Yahoo. But I went a step further and gave you a choice. Ian and Dacal have always been about giving us choices. So just use the COMBOmain.js attached below and put it in the UniAW7.1/Javascript folder. Rename your existing main.js to main-Ian.js and then rename this one to main.js.

    After that you just need to add 1 line to the config.js (or config_iWidget.js).
    Code:
    var GoogleBackup = true; // true for Google API when WW2 goes down; false for New Yahoo API when WW2 goes down
    Leave your "UseExtraLocation" switch set to "neighborhood" so it auto detects if you're traveling through or in a neighborhood. If you aren't it will use city.

    That's all there is to it. It occurred to me that Yahoo's newer feed could also go down - but I've never had Google go down. So we have three-way protection now.

    Enjoy!
    Grant
    COMBOmain.js

    EDITED: Updated a couple of minor things 1/29 3pm.


    So Grant we can use this one on UNIAW7.1 now and if yahoo goes down Google takes over?
    2016-01-30 05:23 AM
  19. NewD's Avatar
    So Grant we can use this one on UNIAW7.1 now and if yahoo goes down Google takes over?
    Yup! Well - I haven't made it auto-sensing. I will soon. So right now if anything were to even go bad with the newer Yahoo feed you'd just have to switch on the GoogleBackup switch you added to config.js. And bamm - you're good. Eventually I'll have it total autosensing - so it'll check for WidgetWeather first, then New Yahoo, and if both fail - it'll choose Google. So as far as our UniAW7.1-based 'widgets' are concerned - this should make them pretty 'bullet-proof' going forward.

    Keep in mind, Blik, as good and accurate as Google is, they're spotty on developments in the suburbs of US. For medium to major sized cities Google NAILS the neighborhoods all over the world. For suburban neighborhoods in US and abroad - not as good as Yahoo -- yet..

    Yahoo's been at this longer than Google. Google will catch up. So if you put the GoogleBackup switch on, at your house, it will say "Broken Arrow" and not "Rockwood". So I think you're better off leaving the Google switch off.

    Where Google really shines for neighborhoods, of any size/type, in my testing these last 18 months, is in Canada and Europe.

    And a sincere enthusiastic shout-out to Marty McFly for getting this really rolling for us and then for Ian Nicoll's master-coder refinements!!! I've been content just to continue learning and contribute a little when I can.
    Last edited by NewD; 2016-01-30 at 05:43 AM.
    2016-01-30 05:36 AM
  20. <Ian Nicoll/>'s Avatar
    All links in post 1 updated (now has my new separate "function" for easy auto detecting, also added the Google part from Grant (Thanks)).

    Tutorial (linked in post 1) is also updated for this new code, I also give some tips for older widget conversions .

    The option for Google or Yahoo city name in Config.js will only take effect if the API WW2 uses goes down (as it currently is), otherwise it will use the usual WW2 stuff.

    I will NOT be making the new Google/Yahoo auto sensing, it's just up to you which one you choose. Personally I believe Yahoo is best but if that feed also goes down then you can set it to Google. It's just better this way.
    2016-01-30 06:03 AM
LINK TO POST COPIED TO CLIPBOARD