+ Reply
Page 41 of 136 FirstFirst ... 313940414243 51 91 ... LastLast
Results 801 to 820 of 2706

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


Thread: GPS Based HTML Lockscreen Weather Theme

is a discussion within the

iPhone 4|4S New Skins / Themes Launches

forums, a part of the

New Skins / Themes Launches

section;
Originally Posted by The_Durben Hey hey Jim Yeah that was early on. It was an alternative to install the app. Had to change the JS as well as originally it
...
  1. #801
    Addicted to Code Dacal's Avatar
    Join Date
    Nov 2010
    Posts
    1,952
    Thanks
    3,035
    Thanked 8,853 Times in 1,560 Posts

    Quote Originally Posted by The_Durben View Post
    Hey hey Jim
    Yeah that was early on. It was an alternative to install the app. Had to change the JS as well as originally it used an app id but you could only get that with app sync and an installer.
    Mucho progress since then
    Talented dudes all helping out from crazy's creation, my limited script changes and getting Path to correct permissions on the original deb I had the Ian, rasputin, and Dacal doing the real scripting to get the functionality we got now. This is awesome
    Thx ! But a lot of work to do for perfect coding and solve the "unknown" condition... . Unfortunatly, not the time this week...


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

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

    Ian Nicoll (03-15-2012), The_Durben (03-15-2012)

  3. #802
    My iPhone is a Part of Me idle0095's Avatar
    Join Date
    Apr 2008
    Posts
    513
    Thanks
    25
    Thanked 136 Times in 98 Posts

    I like the clock. were can i get the clock face and hands?
    Quote Originally Posted by will822 View Post
    Here is Ian's UNiAW5 GPS lockscreen with 4 day forecast.

    Credit goes to Ian, Rasputen, Schnedi, and all the other modders for their work.

  4. #803
    iPhoneaholic
    Join Date
    Jul 2010
    Posts
    441
    Thanks
    172
    Thanked 296 Times in 152 Posts

    Quote Originally Posted by idle0095 View Post
    I like the clock. were can i get the clock face and hands?
    The clock face and hands are from Ian's UNiAW5.0 weather mod.

    Get them here: http://modmyi.com/forums/iphone-4-ne...niaw5-0-a.html

  5. #804
    The Mechanic The_Durben's Avatar
    Join Date
    Aug 2010
    Location
    Vancouver Canada
    Posts
    8,424
    Thanks
    34,944
    Thanked 40,563 Times in 7,513 Posts

    Quote Originally Posted by Dacal View Post
    Thx ! But a lot of work to do for perfect coding and solve the "unknown" condition... . Unfortunatly, not the time this week...
    That would be great to have it use an alternative for unknown. Pretty sure you'll be able to get something done for that. Personally I'm in no rush. I backup a working txt for a major city and turn off location services when I get unknown and just manually run my working lat/long.

    Again though man, appreciate what youve contributed here. The work is fantastic.

  6. The Following 5 Users Say Thank You to The_Durben For This Useful Post:

    Dacal (03-15-2012), GUNNY29 (03-15-2012), Ian Nicoll (03-15-2012), metaserph (03-15-2012), stratnik (03-15-2012)

  7. #805
    Mudder GUNNY29's Avatar
    Join Date
    Aug 2010
    Posts
    5,433
    Thanks
    4,571
    Thanked 15,591 Times in 4,087 Posts

    Is anyone able to hook me up with a properly working gps widget that i can use to make mods for various themes please. I have been following the thread and i appreciate everything all of you guys have done to get the gps weather on our devices big props to crazyviek for bringing the base to us all.
    Click My Sig For my auros Mods

  8. #806
    Livin the iPhone Life KraXik's Avatar
    Join Date
    Mar 2011
    Location
    Winchester, UK
    Posts
    2,624
    Thanks
    2,671
    Thanked 1,754 Times in 891 Posts

    Quote Originally Posted by GUNNY29 View Post
    Is anyone able to hook me up with a properly working gps widget that i can use to make mods for various themes please. I have been following the thread and i appreciate everything all of you guys have done to get the gps weather on our devices big props to crazyviek for bringing the base to us all.
    What's wrong with UniAW5 GPS?

  9. The Following User Says Thank You to KraXik For This Useful Post:

    GUNNY29 (03-15-2012)

  10. #807
    Mudder GUNNY29's Avatar
    Join Date
    Aug 2010
    Posts
    5,433
    Thanks
    4,571
    Thanked 15,591 Times in 4,087 Posts

    I wanted a code that hasn't got UniAW with it. It's prob easy to remove but I don't wanna mess with and f it up
    Click My Sig For my auros Mods

  11. #808
    Livin the iPhone Life KraXik's Avatar
    Join Date
    Mar 2011
    Location
    Winchester, UK
    Posts
    2,624
    Thanks
    2,671
    Thanked 1,754 Times in 891 Posts

    Quote Originally Posted by GUNNY29 View Post
    I wanted a code that hasn't got UniAW with it. It's prob easy to remove but I don't wanna mess with and f it up
    So what about Crazys original theme? All the GPS themes work.

  12. The Following 2 Users Say Thank You to KraXik For This Useful Post:

    GUNNY29 (03-15-2012), The_Durben (03-15-2012)

  13. #809
    The Mechanic The_Durben's Avatar
    Join Date
    Aug 2010
    Location
    Vancouver Canada
    Posts
    8,424
    Thanks
    34,944
    Thanked 40,563 Times in 7,513 Posts

    Quote Originally Posted by GUNNY29 View Post
    I wanted a code that hasn't got UniAW with it. It's prob easy to remove but I don't wanna mess with and f it up
    What about the theme that comes with the app Gunny?
    Style sheet, info, ect. I used that as a template when I made the picture icon version for EPHD.
    Everything in that is working perfectly. Just needs to be restyled to your liking and change icons.

  14. The Following 2 Users Say Thank You to The_Durben For This Useful Post:

    GUNNY29 (03-15-2012), metaserph (03-15-2012)

  15. #810
    Mudder GUNNY29's Avatar
    Join Date
    Aug 2010
    Posts
    5,433
    Thanks
    4,571
    Thanked 15,591 Times in 4,087 Posts

    Is that one good yeah? I thought stuff had been changed since that's why I've not used that one.
    Click My Sig For my auros Mods

  16. The Following User Says Thank You to GUNNY29 For This Useful Post:

    The_Durben (03-15-2012)

  17. #811
    Addicted to Code Dacal's Avatar
    Join Date
    Nov 2010
    Posts
    1,952
    Thanks
    3,035
    Thanked 8,853 Times in 1,560 Posts

    Quote Originally Posted by The_Durben View Post
    That would be great to have it use an alternative for unknown. Pretty sure you'll be able to get something done for that. Personally I'm in no rush. I backup a working txt for a major city and turn off location services when I get unknown and just manually run my working lat/long.

    Again though man, appreciate what youve contributed here. The work is fantastic.

    For unknow condition, it's not a problem. Easy to solve, cause informations are in forecast section. Do you have some exemple of unknown location ? ie woeid is return, but absolutly no weather condition ?


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

  18. The Following User Says Thank You to Dacal For This Useful Post:

    The_Durben (03-15-2012)

  19. #812
    The Mechanic The_Durben's Avatar
    Join Date
    Aug 2010
    Location
    Vancouver Canada
    Posts
    8,424
    Thanks
    34,944
    Thanked 40,563 Times in 7,513 Posts

    Quote Originally Posted by Dacal View Post
    For unknow condition, it's not a problem. Easy to solve, cause informations are in forecast section. Do you have some exemple of unknown location ? ie woeid is return, but absolutly no weather condition ?
    This is the city I'm currently in. "Unknown" description



    These are the Coordinates

    Lat=49.192393*
    Long=-122.845486

    *Edit just noticed the sun animation in the pic? Lol weird
    It's gone now but that shouldn't have showed up at all

  20. The Following User Says Thank You to The_Durben For This Useful Post:

    GUNNY29 (03-15-2012)

  21. #813
    Addicted to Code Dacal's Avatar
    Join Date
    Nov 2010
    Posts
    1,952
    Thanks
    3,035
    Thanked 8,853 Times in 1,560 Posts

    Quote Originally Posted by The_Durben View Post
    This is the city I'm currently in. "Unknown" description



    These are the Coordinates

    Lat=49.192393*
    Long=-122.845486

    *Edit just noticed the sun animation in the pic? Lol weird
    It's gone now but that shouldn't have showed up at all
    For this, already solved in my new javascript. Can you test ? (Or i can send you the complete widget by PM) :

    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Author : Vivek Thakur
    // Date : 25 Feb 2012
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Modified by Dacal for BaSalt HD theme.
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------

    var prevlatitude = "";
    var prevlongitude = "";
    var textLat;
    var textLong;
    var refreshWeatherTimer;
    var refrechLocationTimer;
    var get_location = false;

    function trimString (text) {
    return text.replace(/^\s+/g,'').replace(/\s+$/g,'');
    }

    function UpdateLocation() {
    refrechLocationTimer = setTimeout("UpdateLocation();", 1000*20); // Refresh location every 20 secondes
    var txt_request = new XMLHttpRequest();
    txt_request.overrideMimeType("text/xml");
    var LocationTimer = setTimeout(function() {
    txt_request.abort();
    dealWithWeather({error:true});
    }, 10000);
    txt_request.onload = function(e) {
    clearTimeout(LocationTimer);
    getCoordinates(txt_request.responseText);
    }
    txt_request.open("GET", "file:///private/var/mobile/Documents/myLocation.txt", false);
    txt_request.setRequestHeader("Cache-Control", "no-cache");
    txt_request.send(null);
    }

    function getCoordinates(request) {
    if (request == "") {
    clearTimeout(refrechLocationTimer);
    validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);
    }
    else
    {
    var substr = request.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    latitude = trimString(templatitude[1]);
    longitude = trimString(templongitude[1]);

    if (prevlatitude != latitude || prevlongitude != longitude) {
    prevlatitude = latitude;
    prevlongitude = longitude;
    getWoeid ();
    }
    }
    }

    function getWoeid() {
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R";
    var xml_request = new XMLHttpRequest();
    var WoeidTimer = setTimeout(function() {
    xml_request.abort();
    if (get_location == true) { document.getElementById("Offline").innerHTML = "Offline"; }
    else { dealWithWeather({error:true, errorString:null}); }
    }, 10000);
    xml_request.onload = function(e) {
    clearTimeout(WoeidTimer);
    woeid_loaded(xml_request);
    }
    xml_request.overrideMimeType("text/xml");
    xml_request.open("GET", url+"&antiCache="+Math.floor(Math.random()*1001), false);
    xml_request.setRequestHeader("Cache-Control", "no-cache");
    xml_request.send(null);
    }

    function woeid_loaded(request) {
    if (get_location == true) { clearTimeout(refreshWeatherTimer); }
    var effectiveRoot = findChild(request.responseXML, "ResultSet");
    postal = parseInt(findChild(effectiveRoot, "Result").getElementsByTagName("woeid")[0].childNodes[0].nodeValue);

    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"; }

    get_location = true;
    refreshWeather();
    }

    function refreshWeather() {
    fetchWeatherDataGPS(dealWithWeather,postal);
    var refreshWeatherTimer = setTimeout("refreshWeather()", updateWeatherEvery); // Refresh weather as specified in Config.js
    }

    function fetchWeatherDataGPS (callback, zip) {
    var url="http://weather.yahooapis.com/forecastrss?w="+zip+"&u="+tempUnit;
    var xml_request = new XMLHttpRequest();
    var requestTimer = setTimeout(function() {
    xml_request.abort();
    if (xmldata == false) { callback ({error:true}); } else {
    document.getElementById("Offline").innerHTML = "Offline"; }
    }, 10000);
    xml_request.onload = function(e) {
    clearTimeout(requestTimer);
    xml_GPS_loaded(e, xml_request, callback);
    }
    xml_request.overrideMimeType("text/xml");
    xml_request.open("GET", url+"&antiCache="+Math.floor(Math.random()*1001));
    xml_request.setRequestHeader("Cache-Control", "no-cache");
    xml_request.send(null);
    return xml_request;
    }

    function xml_GPS_loaded (event, request, callback) {
    if (request.responseXML)
    {
    var obj = {error:false, errorString:null};
    xmldata = true;
    var effectiveRoot = findChild(findChild(request.responseXML, "rss"), "channel");
    obj.city = findChild(effectiveRoot, "yweather:location").getAttribute("city");
    obj.humidity = findChild(effectiveRoot, "yweather:atmosphere").getAttribute("humidity" );
    obj.windunit = findChild(effectiveRoot, "yweather:units").getAttribute("speed");
    obj.winddir = findChild(effectiveRoot, "yweather:wind").getAttribute("direction");
    obj.windspeed = findChild(effectiveRoot, "yweather:wind").getAttribute("speed");
    obj.sunrise = findChild(effectiveRoot, "yweather:astronomy").getAttribute("sunrise");
    obj.sunset = findChild(effectiveRoot, "yweather:astronomy").getAttribute("sunset");
    var conditionTag = findChild(findChild(effectiveRoot, "item"), "yweather:condition");
    obj.temp = conditionTag.getAttribute("temp");
    obj.icon = conditionTag.getAttribute("code");
    obj.description = conditionTag.getAttribute("text");
    var forecast = findChild(findChild(effectiveRoot, "item"), "yweather:forecast");
    obj.todaylow = forecast.getAttribute("low");
    obj.todayhigh = forecast.getAttribute("high");
    if (obj.description == "Unknown") {
    obj.description = forecast.getAttribute("text");
    obj.icon = forecast.getAttribute("code");
    }
    if (obj.icon == 3200) obj.icon = 48;
    callback (obj);
    }
    else
    {
    callback ({error:true, errorString:"XML request failed. no responseXML"});
    }
    }


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

  22. The Following 3 Users Say Thank You to Dacal For This Useful Post:

    Ian Nicoll (03-15-2012), stratnik (03-15-2012), The_Durben (03-15-2012)

  23. #814
    The Mechanic The_Durben's Avatar
    Join Date
    Aug 2010
    Location
    Vancouver Canada
    Posts
    8,424
    Thanks
    34,944
    Thanked 40,563 Times in 7,513 Posts

    Quote Originally Posted by GUNNY29 View Post
    Is that one good yeah? I thought stuff had been changed since that's why I've not used that one.
    Nothing has been changed since I changed the path to direct instead of uuid. Works perfectly my man

    Quote Originally Posted by Dacal View Post
    For this, already solved in my new javascript. Can you test ? (Or i can send you the complete widget by PM) :
    I just have to sub the location js? No other changes then?

    I'll throw this in now and let you know.
    Last edited by The_Durben; 03-15-2012 at 04:00 PM.

  24. The Following User Says Thank You to The_Durben For This Useful Post:

    GUNNY29 (03-15-2012)

  25. #815
    Addicted to Code Dacal's Avatar
    Join Date
    Nov 2010
    Posts
    1,952
    Thanks
    3,035
    Thanked 8,853 Times in 1,560 Posts

    Quote Originally Posted by The_Durben View Post
    Nothing has been changed since I changed the path to direct instead of uuid. Works perfectly my man



    I just have to sub the location js? No other changes then?

    I'll throw this in now and let you know.
    Just replace the location.js must do the trick...


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

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

    Ian Nicoll (03-15-2012), The_Durben (03-15-2012)

  27. #816
    Mudder GUNNY29's Avatar
    Join Date
    Aug 2010
    Posts
    5,433
    Thanks
    4,571
    Thanked 15,591 Times in 4,087 Posts

    Sweet thanks man will get on it now 👊👍
    Click My Sig For my auros Mods

  28. The Following User Says Thank You to GUNNY29 For This Useful Post:

    The_Durben (03-15-2012)

  29. #817
    The Mechanic The_Durben's Avatar
    Join Date
    Aug 2010
    Location
    Vancouver Canada
    Posts
    8,424
    Thanks
    34,944
    Thanked 40,563 Times in 7,513 Posts

    Quote Originally Posted by Dacal View Post
    Just replace the location.js must do the trick...
    You bet it does
    Should I be missing my coordinates though? Or do those only now show when a lat/long txt file is called with an accurate description?
    BTW, tested with Sig.Change on and then I also tested entering a var locale instead of "0"
    using location


    Using woeid in Config

  30. The Following 6 Users Say Thank You to The_Durben For This Useful Post:

    Dacal (03-15-2012), elilab (03-15-2012), GUNNY29 (03-15-2012), Ian Nicoll (03-15-2012), metaserph (03-15-2012), stratnik (03-15-2012)

  31. #818
    Mudder GUNNY29's Avatar
    Join Date
    Aug 2010
    Posts
    5,433
    Thanks
    4,571
    Thanked 15,591 Times in 4,087 Posts

    Can I ask one more stupid question lol do the weathericons relate to say stardock weathericons?
    Click My Sig For my auros Mods

  32. The Following User Says Thank You to GUNNY29 For This Useful Post:

    The_Durben (03-15-2012)

  33. #819
    Addicted to Code Dacal's Avatar
    Join Date
    Nov 2010
    Posts
    1,952
    Thanks
    3,035
    Thanked 8,853 Times in 1,560 Posts

    Quote Originally Posted by The_Durben View Post
    You bet it does
    Should I be missing my coordinates though? Or do those only now show when a lat/long txt file is called with an accurate description?
    BTW, tested with Sig.Change on and then I also tested entering a var locale instead of "0"
    using location
    For coordinates, just add the line in red in your uniAw.js (or anything else). In Ian's uniAW, this line is in location.js. In my widget, i put it in Main.js.

    function dealWithWeather(obj){
    if (obj.error == false){
    if (SlideShowOn == true) { widgetStop(); }
    direction = parseFloat(obj.winddir);
    document.getElementById("city").innerHTML=obj.city ;
    document.getElementById("temp").innerHTML=obj.temp + "";
    document.getElementById("low").innerHTML=obj.today low + "";
    document.getElementById("high").innerHTML=obj.toda yhigh + "";
    document.getElementById("desc").innerHTML=obj.desc ription;
    document.getElementById("WeatherStatic").src="Reso urces/Images/WeatherStatic/" + obj.icon + ".png";
    document.getElementById("Offline").innerHTML = "";
    if ( locale == 0) { document.getElementById("coordinates").innerHTML = textLat + " " + textLong; }

    One more problem solved .

    If you have a close look on my script, i made some change that can possibly cause a break in your theme. I stop to use a "locale = 0" to launch the GPS mode.


    In my config.js :

    var gps = true; // You NEED to install crazyvivek's "GPS Weather Lockscreen" for GPS localization
    var locale = 1442746; // Yahoo Weather (used if gps set to false or myLocation.txt file not found)
    In my main.js, in init() :

    if (gps == true) { UpdateLocation(); }
    else { validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal); }
    For the coordinates (same place as above) :

    if (( gps == true) && (get_location == true)) { document.getElementById("coordinates").innerHTML = textLat + " " + textLong; }
    Like this, if the GPS application is not installed (in fact, no myLocation.txt file), the GPS script comes back to the locale of the Config.js.
    Last edited by Dacal; 03-15-2012 at 04:45 PM.


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

  34. The Following 5 Users Say Thank You to Dacal For This Useful Post:

    bombmom (03-16-2012), Ian Nicoll (03-15-2012), lostinthemes (03-17-2012), stratnik (03-15-2012), The_Durben (03-15-2012)

  35. #820
    The Mechanic The_Durben's Avatar
    Join Date
    Aug 2010
    Location
    Vancouver Canada
    Posts
    8,424
    Thanks
    34,944
    Thanked 40,563 Times in 7,513 Posts

    In your location js above I'm assuming this is an error in the code?

    function getCoordinates(request) {
    if (request == "") {
    clearTimeout(refrechLocationTimer);
    validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);

    It should be refreshLocationTimer and not refrech?

    I'll try and add the coordinates back. I think I need only edit the location js as I have Ian's most recent scripts.
    Is that right?

    Quote Originally Posted by GUNNY29 View Post
    Can I ask one more stupid question lol do the weathericons relate to say stardock weathericons?
    Look at the YahooWeatherIcons in crazy's theme, different naming structure so you'd have to rename yours accordingly.
    He has a couple N/As in the 40's or 30's that were incorrect. Those should be the 3200.png for unknown.
    Other than that, you have to rename icons you want to use accordingly.
    Last edited by The_Durben; 03-15-2012 at 05:33 PM.

  36. The Following 2 Users Say Thank You to The_Durben For This Useful Post:

    metaserph (03-15-2012), RippedThemer (03-21-2012)

LinkBacks (?)

  1. 04-12-2013, 02:27 PM
  2. 03-15-2013, 10:09 AM
  3. 08-11-2012, 12:06 AM
  4. 03-03-2012, 12:38 PM

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts