Page 301 of 875 FirstFirst ... 201 251 291299300301302303 311 351 401 801 ... LastLast
Results 6,001 to 6,020 of 17493

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


Thread: UniAW6.0 for iph4 & iph5

  1. #6001
    Quote Originally Posted by bliken View Post
    That would be sweet. If they could do that......
    It's easy, i have done that for a beta that you will probably never see .

    I hope Ian will release the 6.3 soon, based on Yahoo. For accuweather, maybe later. The only problem i see in accuweather version is :

    1) the weather condition translation need to be done for other language than english.

    2) The way i get the postal code for accuweather is not perfect : it will works perfectly for US users, and probably for a lot of people. But it's possible, in some countries, that it does not work (need some adjustement in the code, but i need feedback for that).

    EDIT :

    3) Joking : all my beta testers want the same temp as Yahoo


    BTW, like Durben, i think the better solution would be to catch the information directly from the native weather application. I have test the tweak (beta) it's great and very light. I expect a lot of that.
    Last edited by Dacal; 05-28-2013 at 08:17 PM.


    My themes : Jade HD, Silex HD, BaSalt HD,ToPaz
    All are on Cydia and/or Theme It.

  2. The Following 20 Users Say Thank You to Dacal For This Useful Post:

    17Ball (05-28-2013), Best01 (05-28-2013), bliken (05-28-2013), chevymusclecar (05-28-2013), Destan (05-29-2013), Hip5 (05-28-2013), Ian Nicoll (05-28-2013), Irish_Man (05-28-2013), King_O_Hill (05-28-2013), lostinthemes (05-29-2013), MamaJaay (05-28-2013), Marty McFly (05-28-2013), mfisherbsu (05-28-2013), RandyTG (05-28-2013), sethbossfan (05-28-2013), siemprelisto (05-28-2013), Simon (05-28-2013), TaJr12 (05-30-2013), The.Drifter (05-28-2013), The_Durben (05-28-2013)

  3. #6002
    Understood Dacal.

    Does the switch work well in your beta version? Between yahoo and accuweather?


    Quote Originally Posted by Dacal View Post
    It's easy, i have done that for a beta that you will probably never see .

    I hope Ian will release the 6.3 soon, based on Yahoo. For accuweather, maybe later. The only problem i see in accuweather version is :

    1) the weather condition translation need to be done for other language than english.

    2) The way i get the postal code for accuweather is not perfect : it will works perfectly for US users, and probably for a lot of people. But it's possible, in some countries, that it does not work (need some adjustement in the code, but i need feedback for that).

  4. #6003
    Quote Originally Posted by Dacal View Post
    It's easy, i have done that for a beta that you will probably never see .

    I hope Ian will release the 6.3 soon, based on Yahoo. For accuweather, maybe later. The only problem i see in accuweather version is :

    1) the weather condition translation need to be done for other language than english.

    2) The way i get the postal code for accuweather is not perfect : it will works perfectly for US users, and probably for a lot of people. But it's possible, in some countries, that it does not work (need some adjustement in the code, but i need feedback for that).
    All the more reason we could use a variable switch config.JS. Yahoo = true/false. The main reason we stayed with Yahoo for all this time was because it's free (which now all weather services have a feed that's free) AND because it tended to service areas all around the globe well. I think a lot of us are fed up with Yahoo changing their feet at whim. It's unbelievable to me how we would still want to yield to the whims of yahoos changes. Can you think of how many changes in the last two weeks to how many widgets have been written and rewritten for this most recent capricious change to their code.

    Of course there's no guarantee that Accuweather or some other service won't change their feed. But given the greater accuracy of Accuweather and other weather services in the US burbs over Yahoo, it seems to me best to give the end user a switch as an option. Then when one service goes down, It's a very easy switch to get one or the other up and running.

    But we also have to consider Ian & Dacal's time as well - And remember "it's only a weather widget"
    Last edited by NewdestinyX; 05-28-2013 at 08:33 PM.
    Here to help if I can. If I can't I know someone who can!

  5. The Following User Says Thank You to NewdestinyX For This Useful Post:

    lostinthemes (05-29-2013)

  6. #6004
    Quote Originally Posted by bliken View Post
    Understood Dacal.

    Does the switch work well in your beta version? Between yahoo and accuweather?
    Yes is does. Tested two days

  7. The Following 6 Users Say Thank You to MamaJaay For This Useful Post:

    bliken (05-28-2013), Hip5 (05-29-2013), King_O_Hill (05-28-2013), lostinthemes (05-29-2013), menard_00 (05-29-2013), Wildfowler (05-29-2013)

  8. #6005
    Quote Originally Posted by MamaJaay View Post
    Once iOS 7 comes out, there may not BE a jail break
    You're actually making my point for me, MJ. What are the first things that are up and running and working perfectly after a new jailbreak is found, though? Our weather widgets!

    Why? Because they're based on a weather service feed and not on iOS.

    Java never changes. iOS does.
    Here to help if I can. If I can't I know someone who can!

  9. #6006
    Quote Originally Posted by bliken View Post
    Understood Dacal.

    Does the switch work well in your beta version? Between yahoo and accuweather?
    Yes.


    My themes : Jade HD, Silex HD, BaSalt HD,ToPaz
    All are on Cydia and/or Theme It.

  10. The Following 9 Users Say Thank You to Dacal For This Useful Post:

    bliken (05-28-2013), Hip5 (05-29-2013), King_O_Hill (05-28-2013), lostinthemes (05-29-2013), RKO1195 (05-29-2013), siemprelisto (05-28-2013), Simon (05-28-2013), TaJr12 (05-30-2013), The_Durben (05-28-2013)

  11. #6007
    Relax and enjoy Grant, we're working it. You always have the option to develop a method that suits your needs. I actually fought about having the city update on the fly. I really wanted there to be a special function to force the update. Derrick wanted a refresh button, but I wanted a screen lick option! But in the end, we settled on an auto update.

    Oh, it will be native, as it is the cleanest method if we can get the screen lick option to work!
    Last edited by King_O_Hill; 05-28-2013 at 08:35 PM.

    Check out WW2 for iOS 8 - Widget-Weather 2.0

  12. The Following 8 Users Say Thank You to King_O_Hill For This Useful Post:

    chevymusclecar (05-28-2013), Hip5 (05-29-2013), lostinthemes (05-29-2013), RandyTG (05-28-2013), siemprelisto (05-28-2013), TaJr12 (05-30-2013), The_Durben (05-28-2013), Wildfowler (05-29-2013)

  13. #6008
    Quote Originally Posted by King_O_Hill View Post
    Relax and enjoy Grant, we're working it. You always have the option to develop a method that suits your needs. I actually fought about having the city update on the fly. I really wanted there to be a special function to force the update. Derrick wanted a refresh button, but I wanted a screen lick option! But in the end, we settled on an auto update.

    Oh, it will be native, as it is the cleanest method if we can get the screen lick option to work!
    I am intrigued, Brian! As long as city is auto updating, as I've said ad nauseam now. My only remaining concern with native is that it's based on iOS code which changes with every iOS update. An XML feed in Java never changes, code wise. Our weather widgets work immediately after a new jailbreak every time. That will not be guaranteed using native going forward. Unless there's something I'm missing. If I am, I know you all will "educate" me..
    Here to help if I can. If I can't I know someone who can!

  14. The Following User Says Thank You to NewdestinyX For This Useful Post:

    lostinthemes (05-29-2013)

  15. #6009
    Is there any hope for the widgets I posted to be fixed, or is the code too old/obsolete for it to be an easy fix? IIRC, Max's mods were from over a half a year ago before ios6 came out... Should I just scrap them?

    Dacal, do you think you could spare some time to check out your LS and see if you can tweak it for the new working code?
    Last edited by myang1989; 05-28-2013 at 08:50 PM.

  16. #6010
    Quote Originally Posted by NewdestinyX View Post
    All the more reason we could use a variable switch config.JS. Yahoo = true/false. The main reason we stayed with Yahoo for all this time was because it's free (which now all weather services have a feed that's free) AND because it tended to service areas all around the globe well. I think a lot of us are fed up with Yahoo changing their feet at whim. It's unbelievable to me how we would still want to yield to the whims of yahoos changes. Can you think of how many changes in the last two weeks to how many widgets have been written and rewritten for this most recent capricious change to their code.

    Of course there's no guarantee that Accuweather or some other service won't change their feed. But given the greater accuracy of Accuweather and other weather services in the US burbs over Yahoo, it seems to me best to give the end user a switch as an option. Then when one service goes down, It's a very easy switch to get one or the other up and running.

    But we also have to consider Ian & Dacal's time as well - And remember "it's only a weather widget"
    Except for one thing, you don't have to maintain the redundant code!

    You've seen how taxing it can be to keep one feed going, image to keep 2 feeds going. Feeds are always going to change, it's called progress. Just go with it! It's a small price to pay for all that we enjoy!

    Check out WW2 for iOS 8 - Widget-Weather 2.0

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

    Best01 (05-28-2013), lostinthemes (05-29-2013), The_Durben (05-28-2013)

  18. #6011
    Quote Originally Posted by NewdestinyX View Post
    I am intrigued, Brian! As long as city is auto updating, as I've said ad nauseam now. My only remaining concern with native is that it's based on iOS code which changes with every iOS update. An XML feed in Java never changes, code wise. Our weather widgets work immediately after a new jailbreak every time. That will not be guaranteed using native going forward. Unless there's something I'm missing. If I am, I know you all will "educate" me..
    The GPS tweak didn't work for quite a while after 5.1.1 came out and if not for Bushe, you'd still be entering a woeid :P

  19. The Following 5 Users Say Thank You to MamaJaay For This Useful Post:

    Hip5 (05-29-2013), King_O_Hill (05-28-2013), lostinthemes (05-29-2013), TaJr12 (05-30-2013), The_Durben (05-28-2013)

  20. #6012
    i wish they release it and not keep it beta

    Quote Originally Posted by MamaJaay View Post
    Yes is does. Tested two days

  21. #6013
    Quote Originally Posted by NewdestinyX View Post
    I am intrigued, Brian! As long as city is auto updating, as I've said ad nauseam now. My only remaining concern with native is that it's based on iOS code which changes with every iOS update. An XML feed in Java never changes, code wise. Our weather widgets work immediately after a new jailbreak every time. That will not be guaranteed using native going forward. Unless there's something I'm missing. If I am, I know you all will "educate" me..
    Ok, is there an iOS version that the weather app does not work in. The feed for it will always remain the same, with the exception of additions to it, but the original functionality should always be there.

    Now JavaScript will not really change, again it will grow, but rarely becomes obsolete. Now here's where you are dead wrong, an XML or JSON feed will always change and evolve as technology advances. So would you rather one update for each iOS, or potentially an unknown amount of changes based from a feed. It has changed 3 times already in the last 3 months.

    Check out WW2 for iOS 8 - Widget-Weather 2.0

  22. The Following 2 Users Say Thank You to King_O_Hill For This Useful Post:

    lostinthemes (05-29-2013), The_Durben (05-28-2013)

  23. #6014
    please release your beta version

    Quote Originally Posted by Dacal View Post
    Yes.

  24. #6015
    Quote Originally Posted by King_O_Hill View Post
    Except for one thing, you don't have to maintain the redundant code!

    You've seen how taxing it can be to keep one feed going, image to keep 2 feeds going. Feeds are always going to change, it's called progress. Just go with it! It's a small price to pay for all that we enjoy!
    Ian and you both told me that when a switch is set to 'off' (false or hide) the code is NOT running in the background. So which is it, bro? Is it running or not - when the config.js is set to off? I could care less about 'redundant code' in the widget if it's not running in the background. Look at all the language translation code you have to wade through in the main.js of most widgets. I have started separating out the language translation stuff to its own js called in the html- just so I don't have to look at it all and scroll through it in iFile.. Uggh. BUT - for sure the Chinese isn't running when I have it set to English. Right?

    Quote Originally Posted by MamaJaay View Post
    The GPS tweak didn't work for quite a while after 5.1.1 came out and if not for Bushe, you'd still be entering a woeid :P
    But WOEID always worked immediately after every update since iOS4. That's my point. Living without auto city change is far better than living without weather data transferring immediately.

    Quote Originally Posted by King_O_Hill View Post
    Ok, is there an iOS version that the weather app does not work in. The feed for it will always remain the same, with the exception of additions to it, but the original functionality should always be there.
    Agreed. But the code you use to 'extract' the feed data will likely need a rewrite each time as iOS changes the implementation of how the Weather.app works. That was my point. Of course the Weather app works. BUT does it work using the same code to populate the weather fields....

    Now here's where you are dead wrong, an XML or JSON feed will always change and evolve as technology advances. So would you rather one update for each iOS, or potentially an unknown amount of changes based from a feed. It has changed 3 times already in the last 3 months.
    Only with Yahoo, bro. None of Ras' weather widgets have 'ever gone down'. Why not? Feed hasn't changed from the services he uses. Yahoo is to blame for our downtime, bro, not the nature of XML/JSON. Agreed?

    I'm actually not pushing back on Native now as much - since you've all agreed, pretty much, that auto-update has to be in the end game of a viable alternative to XML/JSON feeds. I'm down with that - for sure.. I've always believed in the logic of getting weather from iOS Weather app. So, WIND IN YOUR SAILS - native weather boys and girls!! Thanks for all your research! You know me - I'm a thorough alpha/beta tester. Don't leave me out please.
    Last edited by NewdestinyX; 05-28-2013 at 09:57 PM.
    Here to help if I can. If I can't I know someone who can!

  25. The Following User Says Thank You to NewdestinyX For This Useful Post:

    lostinthemes (05-29-2013)

  26. #6016
    What's Jailbreak?
    Join Date
    May 2013
    Location
    Pennsylvania
    Posts
    10
    Thanks
    44
    Thanked 7 Times in 6 Posts

    Quote Originally Posted by Marty McFly View Post
    Any time bro - here to help!


    --------------------------------------------------------


    Fix any widget yourself

    Really easy to get things back up and running yourself with a 4-day Yahoo forecast (if that's what you want )....

    1) uncomment the lines discussed earlier in this thread to fix the "one-day forecast issue".
    2) If your Yahoo URL weather call line in UniAW6.js looks like this:

    var url="http://xml.weather.yahoo.com/forecastrss/" + zip + "_" + tempUnit + ".xml";

    Attachment 640694

    ...then change it to this...

    var url="http://xml.weather.yahoo.com/forecastrss/"+zip+"&u="+tempUnit+"&d=5.xml";

    Attachment 640695

    I've already received lots of PM's about the Yahoo line looking different for some people. If your your Yahoo URL weather call line in 'weather.js' or whatever other file your are using just looks like this:

    url="http://xml.weather.yahoo.com/forecastrss/"

    ...then you need to change this line which is just below the URL line:

    xml_request.open("GET", url+zip+'_'+varUnit+'.xml');

    to this...

    xml_request.open("GET", url+zip+'&u='+varUnit+'&d=5.xml');


    Done!!
    Hope that helps

    BTW - I would sincerely like to thank yuengling25 for bringing this to our attention

    **Thanks for the pics MJ

    Forecast code works great. Thank you!

  27. The Following User Says Thank You to MnM'S For This Useful Post:

    Marty McFly (05-29-2013)

  28. #6017
    Quote Originally Posted by Dacal View Post
    It's working, and very good for US.

    Just to play :
    location.js :
    Code:
    //--------------
    // Initial author : Vivek Thakur / rewrite by Dacal
    // Date : 17/05/2013
    //-----------------------
    
    var prevlatitude;
    var prevlongitude;
    var textLat;
    var textLong;
    var city;
    var countrycode;
    var postalcode;
    
    var yahoo_info = new Array();
    var accu_city = new Array();
    var accu_postal = new Array();
    var accu_state = new Array();
    var accu_countrycode = new Array();
    
    String.prototype.sansAccent = function() {
    var accent = [
    /[\300-\306]/g, /[\340-\346]/g, // A, a
    /[\310-\313]/g, /[\350-\353]/g, // E, e
    /[\314-\317]/g, /[\354-\357]/g, // I, i
    /[\322-\330]/g, /[\362-\370]/g, // O, o
    /[\331-\334]/g, /[\371-\374]/g, // U, u
    /[\321]/g, /[\361]/g, // N, n
    /[\307]/g, /[\347]/g, // C, c
    ];
    var noaccent = ['A','a','E','e','I','i','O','o','U','u','N','n','C ','c'];
    var str = this;
    for(var i = 0; i < accent.length; i++){
    str = str.replace(accent[i], noaccent[i]);
    }
    return str;
    }
    
    // LOCAL REQUEST : UPDATE THE COORDINATES FROM MYLOCATION.TXT FILE
    function UpdateLocation() {
    refreshLocationTimer = setTimeout(UpdateLocation, 20*1000);
    jQuery.get('file:///private/var/mobile/Documents/myLocation.txt', function(appdata) {
    // jQuery.get('myLocation.txt', function(appdata) {
    if ($.cookie('locationCookie') != null) {
    prevlatitude = $.cookie('locationCookie').prevlatitude;
    prevlongitude = $.cookie('locationCookie').prevlongitude;
    }
    var myvar = appdata;
    var substr = appdata.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);
    
    if ((prevlatitude != latitude) || (prevlongitude != longitude)) {
    if (latitude < 0) { textLat = Math.round(latitude*100)/100 + "\u00B0" + "S"; }
    else if (latitude > 0){ textLat = Math.round(latitude*100)/100 + "\u00B0" + "N"; }
    else { textLat = Math.round(latitude*100)/100 + "\u00B0"; }
    if (longitude < 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "W"; }
    else if (longitude > 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "E"; }
    else { textLong = Math.round(longitude*100)/100 + "\u00B0"; }
    $.cookie('locationCookie', '{"prevlatitude":"'+latitude+'", "prevlongitude":"'+longitude+'", "textLat":"'+textLat+'", "textLong":"'+textLong+'"}', {expires: 365});
    searchWoeid(latitude, longitude); // SUCCESS
    }
    }).fail(function() {
    clearTimeout(refreshLocationTimer); // No myLocation.txt file, stop GPS mode.
    gps = false;
    TextColor = "TextColorGrey";
    if (($.cookie('jsonCookie') == null) || (Update_Always == true)) { weatherRefresherTemp(zip); }
    });
    }
    
    // FIRST INTERNET REQUEST : SEARCH WOEID FROM THE COORDINATES
    function searchWoeid(latitude, longitude) {
    var url = 'http://query.yahooapis.com/v1/public/yql?q=select * from geo.placefinder where text="'+latitude+','+longitude+'" and gflags="R"&format=json';
    $.getJSON(url, function(data) {
    var found = data.query.count; // Check if coordinates return a valid location.
    if ( found == 1) {
    city = data.query.results.Result.city;
    var neighborhood = data.query.results.Result.neighborhood;
    postalcode = data.query.results.Result.postal;
    countrycode = data.query.results.Result.countrycode;
    yahoo_info = []; // REINITIALIZE THE ARRAY
    
    // COUNTRY FORMAT
    yahoo_info[0] = data.query.results.Result.country;
    if (yahoo_info[0] != null) {
    yahoo_info[0] = yahoo_info[0].sansAccent().toUpperCase();
    if (yahoo_info[0] .indexOf('-') != -1) {
    var tmp_country = yahoo_info[0].split('-');
    tmp_country.sort(function(a,b) { return a.length < b.length; });
    yahoo_info[1] = tmp_country[0];
    } else {
    yahoo_info[1] = "NO-HERE";
    }
    }
    
    // COUNTY FORMAT
    yahoo_info[2] = data.query.results.Result.county;
    if (yahoo_info[2] != null) {
    yahoo_info[2] = yahoo_info[2].sansAccent().toUpperCase();
    if (yahoo_info[2].indexOf('-') != -1) {
    var tmp_county = yahoo_info[2].split('-');
    tmp_county.sort(function(a,b) { return a.length < b.length; });
    yahoo_info[3] = tmp_county[0];
    } else {
    yahoo_info[3] = "NO-HERE";
    }
    }
    
    // STATE NAME FORMAT
    yahoo_info[4] = data.query.results.Result.state;
    if (yahoo_info[4] != null) {
    yahoo_info[4] = yahoo_info[4].sansAccent().toUpperCase();
    if (yahoo_info[4].indexOf('-') != -1) {
    var tmp_statename = yahoo_info[4].split('-');
    tmp_statename.sort(function(a,b) { return a.length < b.length; });
    yahoo_info[5] = tmp_statename[0];
    } else {
    yahoo_info[5] = "NO-HERE";
    }
    }
    
    // WORKAROUND FOR UK USERS
    if (countrycode == "GB") { countrycode = "UK"; }
    
    if (UseNeighborhood == true) {
    if (neighborhood != null) { city = neighborhood; }
    }
    
    if ((countrycode == "US") && (postalcode != null)) {
    gps = true;
    zip = postalcode;
    TextColor = "TextColorGrey";
    weatherRefresherTemp(zip); // Refresh weather as specified in Config.js.
    } else {
    searchZipcode();
    }
    } else {
    if (xmldata == false) { // No data. Keep weather or back to locale, maintain the 20s refresh for GPS localization.
    gps = false;
    TextColor = "TextColorGrey";
    weatherRefresherTemp(zip);
    } else {
    $.cookie('offlineCookie', true, {expires: 365});
    document.getElementById("coordinates").className = "TextColorRed";
    document.getElementById("coordinates").innerHTML = "OFFLINE";
    }
    }
    }).fail(function() {
    $.removeCookie('locationCookie');
    $.cookie('offlineCookie', true, {expires: 365});
    if (xmldata == true) {
    document.getElementById("coordinates").className = "TextColorRed";
    document.getElementById("coordinates").innerHTML = "OFFLINE";
    } else {
    if ( $.cookie('jsonCookie') != null ) {
    xmldata = true;
    dealWithWeather ({error:false, storage:true});
    } else {
    dealWithWeather ({error:true});
    }
    }
    });
    }
    
    // SECOND INTERNET REQUEST : SEARCH ZIP CODE WITH THE WOEID (NECESSARY FOR FORECAST)
    function searchZipcode() {
    var url = "http://apple.accuweather.com/adcbin/apple/Apple_find_city.asp?location="+escape(city)+","+co untrycode;
    $.get(url, function(data) {
    var us = $(data).find('CityList').attr('us')*1;
    var intl = $(data).find('CityList').attr('intl')*1;
    var extra_cities = $(data).find('CityList').attr('extra_cities')*1;
    var exist = intl + us + extra_cities;
    if (exist != 0) {
    var newpostal = ""; // INITIALIZE ZIP CODE
    if (exist == 1) {
    // JUST ONE LOCATION FOUND, CERTAINLY THE GOOD ONE
    newpostal = $(data).find("location").attr("postal");
    } else {
    // RETRIEVE ALL CITIES
    var i=0;
    $(data).find('location').each( function() {
    accu_city[i] = $(this).attr("city");
    accu_state[i] = $(this).attr("state").sansAccent().toUpperCase();
    accu_postal[i] = $(this).attr("postal");
    accu_countrycode[i] = accu_postal[i].split('|')[1];
    i++;
    });
    
    /* ---- SEARCH FOR THE MOST ACCURATE PLACE - ORDER IS IMPORTANT ! ----*/
    for (t=0; t < yahoo_info.length; t++) {
    for (i=0; i < accu_city.length; i++) {
    if ((accu_city[i] == city) && (accu_countrycode[i] == countrycode) && (accu_state[i].indexOf(yahoo_info[t]) != -1)) {
    newpostal = accu_postal[i];
    break; // STOP THE INNER LOOP, NOT THE MAIN ONE !
    }
    }
    }
    }
    // CHECK IF WE HAVE A VALID POSTAL CODE
    if (newpostal != "") {
    zip = newpostal;
    gps = true;
    TextColor = "TextColorGrey";
    weatherRefresherTemp(zip); // Refresh weather as specified in Config.js.
    } else {
    if ( xmldata == false ) { // Back to locale, but keep the 20s refresh for GPS localization.
    gps = false;
    TextColor = "TextColorGrey";
    weatherRefresherTemp(zip);
    } else {
    gps = true;
    TextColor = "TextColorRed";
    weatherRefresherTemp($.cookie('jsonCookie').zip); // Keep the latest valid zip to update the weather.
    }
    }
    } else {
    if ( xmldata == false ) { // Back to locale, but keep the 20s refresh for GPS localization.
    gps = false;
    TextColor = "TextColorGrey";
    weatherRefresherTemp(zip);
    } else {
    gps = true;
    TextColor = "TextColorRed";
    weatherRefresherTemp($.cookie('jsonCookie').zip); // Keep the latest valid zip to update the weather.
    }
    }
    }).fail(function() {
    $.removeCookie('locationCookie');
    $.cookie('offlineCookie', true, {expires: 365});
    if (xmldata == true ) {
    document.getElementById("coordinates").className = "TextColorRed";
    document.getElementById("coordinates").innerHTML = "OFFLINE";
    } else {
    if ( $.cookie('jsonCookie') != null ) {
    xmldata = true;
    dealWithWeather ({error:false, storage:true});
    } else {
    dealWithWeather ({error:true});
    }
    }
    });
    }

    Main part of uniAW6 :
    Code:
    function fetchWeatherData (callback, zip) {
    var url="http://apple.accuweather.com/adcbin/apple/Apple_Weather_Data.asp?zipcode=" + zip + "&metric=" + tempUnit;
    $.get(url, function(data) {
    xmldata = true;
    var obj = {error:false, storage:false};
    $(data).find('CurrentConditions').each( function() {
    if (gps == false) {
    obj.city = $.trim($(this).find('City').text());
    obj.coordinates = "["+zip+"]";
    } else {
    obj.city = city;
    obj.coordinates = "["+ $.cookie('locationCookie').textLat + " " + $.cookie('locationCookie').textLong + "]";
    }
    obj.windspeed = $.trim($(this).find('WindSpeed').text())*1;
    obj.humidity = $.trim($(this).find('Humidity').text());
    obj.icon = $.trim($(this).find('WeatherIcon').text())*1;
    obj.winddir = $.trim($(this).find('WindDirection').text());
    obj.rising = $.trim($(this).find('Pressure').attr('state'));
    obj.visibility = $.trim($(this).find('Visibility').text())*1;
    obj.pressure = Math.round($.trim($(this).find('Pressure').text()) * 33.8638864);
    obj.realFeel = $.trim($(this).find('RealFeel').text());
    obj.temp = $.trim($(this).find('Temperature').text());
    obj.description = $.trim($(this).find('WeatherText').text());
    });
    obj.sunrise = $.trim($(data).find('Sun').attr('rise'));
    obj.sunset = $.trim($(data).find('Sun').attr('set'));
    obj.forecastday = [];
    obj.forecasthigh = [];
    obj.forecastlow = [];
    obj.forecastreallow = [];
    obj.forecastrealhigh = [];
    obj.forecastcode = [];
    var i = 0;
    $(data).find('day').each( function() {
    obj.forecastday[i] = $.trim($(this).find("DayCode").text());
    obj.forecastlow[i] = $.trim($(this).find("Low_Temperature").text());
    obj.forecasthigh[i] = $.trim($(this).find("High_Temperature").text());
    obj.forecastreallow[i] = $.trim($(this).find("Low_Temperature").text());
    obj.forecastrealhigh[i] = $.trim($(this).find("Real_Feel_High").text());
    obj.forecastcode[i] = $.trim($(this).find("WeatherIcon").text())*1;
    i++;
    });
    if (obj.description == "Unknown") {
    obj.description = obj.forecasttext[0];
    obj.icon = obj.forecastcode[0];
    }
    obj.pressureunit = "mb";
    obj.visibilityunit = (tempUnit == "0") ? "mi" : "km";
    obj.windunit = (tempUnit == "0") ? "mph" : "km/h";
    obj.gps = gps;
    obj.timetochangewall = time_to_change_wall;
    obj.lastupdate = currentTimeString+' '+timeOfDay;
    obj.zip = zip;
    
    // CREATE A COOKIE WITH ALL WEATHER INFORMATIONS
    var weather = JSON.stringify(obj);
    $.cookie('jsonCookie', weather, {expires: 365});
    
    // REMOVE OFFLINE COOKIE
    $.removeCookie('offlineCookie');
    
    callback (obj);
    
    }).fail(function() {
    $.cookie('offlineCookie', true, {expires: 365});
    if (xmldata == true ) {
    document.getElementById("coordinates").className = "TextColorRed";
    document.getElementById("coordinates").innerHTML = "OFFLINE";
    } else {
    if ($.cookie('jsonCookie') != null ) {
    xmldata = true;
    callback ({error:false, storage:true});
    } else {
    callback ({error:true});
    }
    }
    });
    }
    Dacal.. thanks for this. I played with it tonite - adding it to the most recent UniAW6.21 Lockscreen version. And it just renders the LS widget dead. Shows weather info background with no data and a dead clock. Are you sure something doesn't also need to be added to the config.js too? Were these two sections of code to be added to UniAW LS? Or some other widget? I'd love to 'play with it'..
    Here to help if I can. If I can't I know someone who can!

  29. #6018
    Quote Originally Posted by NewdestinyX View Post
    Ian and you both told me that when a switch is set to 'off' (false or hide) the code is NOT running in the background. So which is it, bro? Is it running or not - when the config.js is set to off? I could care less about 'redundant code' in the widget if it's not running in the background. Look at all the language translation code you have to wade through in the main.js of most widgets. I have started separating out the language translation stuff to its own js called in the html- just so I don't have to look at it all and scroll through it in iFile.. Uggh. BUT - for sure the Chinese isn't running when I have it set to English. Right?
    First, you misunderstood my response, but if you go back and look at my post, it said yes and no, it depends on how the code is written. I'm pretty sure Ian said the same thing too. Anyway, when I said about maintaining the code, I didn't mean you. Ian or Dacal would have the burden to keep 2 separate sets of weather code working instead of one. I could care less about language code either, as again, language almost never change especially weather descriptions and the names of the days of the week. Once written, it's done! We are not doing this just for you.

    Quote Originally Posted by NewdestinyX View Post
    But WOEID always worked immediately after every update since iOS4. That's my point. Living without auto city change is far better than living without weather data transferring immediately.
    Sure it does, but if you want to be stuck with no locational updates and having to manually enter your code. It's only luck that the feeds have not changed prior to a new JB, so this point is moot.


    Quote Originally Posted by NewdestinyX View Post
    Agreed. But the code you use to 'extract' the feed data will likely need a rewrite each time as iOS changes the implementation of how the Weather.app works. That was my point. Of course the Weather app works. BUT does it work using the same code to populate the weather fields....
    As I've always said, no software is perfect and can cover all scenarios. An update may always be necessary, but I bet that one of the safest apps is the weather, as it hasn't changed much.

    Quote Originally Posted by NewdestinyX View Post
    Only with Yahoo, bro. None of Ras' weather widgets have 'ever gone down'. Why not? Feed hasn't changed from the services he uses. Yahoo is to blame for our downtime, bro, not the nature of XML/JSON. Agreed?
    Have you been running Ras's widgets? Maybe he has said that they haven't changed, but seeing that they need a key and they limit you, I would expect that they don't change often. We are basically using Yahoo's beta feed, so you get what you get.

    Quote Originally Posted by NewdestinyX View Post
    I'm actually not pushing back on Native now as much - since you've all agreed, pretty much, that auto-update has to be in the end game of a viable alternative to XML/JSON feeds. I'm down with that - for sure.. I've always believed in the logic of getting weather from iOS Weather app. So, WIND IN YOUR SAILS - native weather boys and girls!! Thanks for all your research! You know me - I'm a thorough alpha/beta tester. Don't leave me out please.
    Just hang in there, right now we need to get it to a good point prior to releasing it for beta.

    Check out WW2 for iOS 8 - Widget-Weather 2.0

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

    The_Durben (05-29-2013)

  31. #6019
    Modder & Coder Ian Nicoll's Avatar
    Join Date
    Oct 2008
    Location
    From Scotland, live in the Philippines.
    Posts
    5,415
    Thanks
    8,481
    Thanked 21,669 Times in 4,343 Posts

    Default 6.3_LS_Accuweather_Version (beta)
    Sorry I don't have more than a 2hrs per day to spend on the UniAW at present, the 6.3LS (Yahoo version) will have to wait a few days.

    Here is the 6.3LS(Accuweather) version, I think I'm finished all my little tweaks on this but not 100% sure, so treat it as beta, please do some testing if you can. I keep it out of post 1 for now, we wait a few days incase of issues.

    I have the Yahoo version but not had time to look yet, again in few days... sorry, but work now getting too busy.

    I'm not going to fix 6.1 or 6.2 in post one, I will now start with the 6.3 all versions Yahoo and separately all versions Accuweather.

    Maybe later we change this to all versions have choice: Yahoo or Accuweather.

    Too much versions on the Mac now.. very confusing LOL.

    So please enjoy this best UniAW version to date (Accuweather) & only LS for now)).

    Can't thank my friend Dacal enough, he has worked so hard for the last 10 days and now Yahoo comes back with forecast! But you never know with Yahoo, so...
    This version is completely dedicated to Dacal, all Accuweather, with more functions and options that I can post here. THANKS DACAL. So good to have another choice! (and yet another on in the making so soon have 3 choices)

    Many thanks to MamaJaay for allowing us to incorporate her amazing timed walls, special thanks also to bombmom.
    Much thanks to everybody on this thread for helping out others in need over the last 10 days, you guys have been awesome!
    Also, raise my hat to all the people supplying mods to others here and to all working on the "super secret" 3rd choice coming soon.
    I don't want to thank the academy LOL..

    Here is the link.


    UniAW6.3_LS_(Accuweather).zip

    There is a link to this post at the top of post 1.
    Last edited by Ian Nicoll; 05-29-2013 at 12:50 AM.

    "If it's not broken, I'll fix it till it is"

  32. The Following 52 Users Say Thank You to Ian Nicoll For This Useful Post:

    17Ball (05-29-2013), A11AST3R (05-28-2013), ahh_boi (05-29-2013), azaleea (05-29-2013), bombmom (05-29-2013), BoyBastos (05-29-2013), boywonder34 (05-29-2013), burrzoo (05-29-2013), chevymusclecar (05-29-2013), cuzin (05-29-2013), Dacal (05-29-2013), dakkota (05-29-2013), Darrenrooster (05-29-2013), Destan (05-29-2013), Dexy88 (05-29-2013), Hip5 (05-29-2013), iamevl (05-29-2013), iModer (05-29-2013), Irish_Man (05-29-2013), jawonder (05-29-2013), jonb9899 (05-30-2013), Kazuyoshi (05-28-2013), King_O_Hill (05-29-2013), Kr0NiK (05-29-2013), KraXik (05-29-2013), lostinthemes (05-29-2013), MamaJaay (05-29-2013), Marty McFly (05-29-2013), Maverick1925 (05-29-2013), menard_00 (05-29-2013), mentop (05-29-2013), mfisherbsu (05-29-2013), myang1989 (05-29-2013), mynanolife (05-29-2013), NewdestinyX (05-28-2013), nik1975 (05-29-2013), phil73 (05-29-2013), RandyTG (05-29-2013), RKO1195 (05-29-2013), rlopez97 (05-30-2013), scooterfips (05-29-2013), serky (05-29-2013), sethbossfan (05-28-2013), SHARON1O (05-29-2013), siemprelisto (05-28-2013), TaJr12 (05-30-2013), TeddyDiesel (06-01-2013), ThatDarnCobra (05-29-2013), The Analyst (05-29-2013), The_Durben (05-29-2013), VOLTAGExDT (05-28-2013), Wildfowler (05-29-2013)

  33. #6020
    Astounding Ian & Dacal. Astounding! And it's reporting the PROPER weather for my suburb.. finally!!!!'
    Here to help if I can. If I can't I know someone who can!

  34. The Following 2 Users Say Thank You to NewdestinyX For This Useful Post:

    Dacal (05-29-2013), Ian Nicoll (05-28-2013)

Page 301 of 875 FirstFirst ... 201 251 291299300301302303 311 351 401 801 ... 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
  •