Page 24 of 136 FirstFirst ... 142223242526 34 74 124 ... LastLast
Results 461 to 480 of 2706

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


Thread: GPS Based HTML Lockscreen Weather Theme

  1. #461
    Modder & Coder Ian Nicoll's Avatar
    Join Date
    Oct 2008
    Location
    From Scotland, live in the Philippines.
    Posts
    5,036
    Thanks
    7,855
    Thanked 19,908 Times in 3,997 Posts

    Quote Originally Posted by The_Durben View Post

    Ian, uninstall the app however you installed it and download the EPHDiOS5_GPS_Weather
    It will install the app and the EPHD GPS Weather theme.

    Perfectly safe. There have multiple downloads with no issue. Two people only have a problem with info displaying.

    Then you'll have the same deb installed as Chevy, schnedi, and I.

    BTW Ian, enjoy EPHD. It's awesome. Super clean theme
    If you haven't yet, try my EPHDiOS5 iNteractive SS LS
    Just a sideshow, nothing too fancy. Touching center pic makes it go back a pic each time it's touched.
    Okay, I did it, and no issues whatsoever, all I had to do to get the UniAW (PerPage version) was change the link to:

    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) { (thanks rasputin)

    One thing I notice now, in the Documents folder I have the "mylocation.txt" AND the "locationPath.txt" file, with the symlink you just have the one file, don't know if thats why it wasn't updating or not, will have to wait till I go to work tomorrow to find out.

    Thanks for this pal, everything seems good now and were all on the same page.

    Looking forward to trying EPHD but no time yet!

    @ Chevy, will let you know if it is autoupdating tomorrow M8. Or we see if Dacal finds something, but if it's updating for "The_D" maybe hid deb did the trick!

    3:30AM here, tomorrow all.
    Last edited by Ian Nicoll; 03-07-2012 at 12:36 PM.

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

  2. The Following 6 Users Say Thank You to Ian Nicoll For This Useful Post:

    bombmom (03-07-2012), chevymusclecar (03-08-2012), Dacal (03-07-2012), King_O_Hill (03-07-2012), Schnedi (03-08-2012), The_Durben (03-07-2012)

  3. #462
    Quote Originally Posted by Ian Nicoll View Post
    Okay, I did it, and no issues whatsoever, all I had to do to get the UniAW (PerPage version) was change the link to:

    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) { (thanks rasputin)

    One thing I notice now, in the Documents folder I have the "mylocation.txt" AND the "locationPath.txt" file, with the symlink you just have the one file, don't know if thats why it wasn't updating or not, will have to wait till I go to work tomorrow to find out.

    Thanks for this pal, everything seems good now and were all on the same page.

    Looking forward to trying EPHD but no time yet!

    @ Chevy, will let you know if it is autoupdating tomorrow M8. Or we see if Dacal finds something, but if it's updating for "The_D" maybe hid deb did the trick!

    3:30AM here, tomorrow all.
    No worries Ian. Glad you're sorted!
    I changed my path to that one by rasputin as well to see although I had it working with my original path as well
    I also have locationPath.txt but all it does is keep a log of the MyLocation app use. Shows info for start time of Sig.Change, when new info is grabbed ect.
    I delete it and it comes back on activating the app again.
    It apparently does not have anything to do with the overall function as after deleting it, everything still works.

    Good night my friend and thanks again for all the advice, files ect! Always appreciated

    Edit** Just noticed my uniaw was working but someone I sent to to test didn't have the animated weather or description show.
    I replaced the uniaw5.html with yours and mine still worked but I see an extra div for "chill"
    What is this calling for? I didn't place it in the CSS but still working.
    Last edited by The_Durben; 03-07-2012 at 01:36 PM.

  4. #463
    Hi @ll,

    I rework the code a little (as i don't know jQuery, i replace with some classic AJAX functions, for me it's more easy to integrate). Here is my main code for the GetLocation_weather.js :

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

    var prevlatitude = "";
    var prevlongitude = "";
    var textLat;
    var textLong;
    var woeid;
    var get_location = false;

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

    function UpdateLocation() {
    var file="../../../../var/mobile/Documents/myLocation.txt";
    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, false);
    txt_request.setRequestHeader("Cache-Control", "no-cache");
    txt_request.send(null);
    setTimeout("UpdateLocation();", updateWeatherEvery); // Refresh location
    }

    function getCoordinates(request) {
    var substr = request.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    latitude = trimString(templatitude[1]);
    longitude = trimString(templongitude[1]);

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

    if (prevlatitude != latitude || prevlongitude != longitude) {
    getWoeid ();
    prevlatitude = latitude;
    prevlongitude = longitude;
    }
    else {
    fetchWeatherData(dealWithWeather,postal);
    }
    }

    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) {
    get_location = true;
    var effectiveRoot = findChild(request.responseXML, "ResultSet");
    postal = parseInt(findChild(effectiveRoot, "Result").getElementsByTagName("woeid")[0].childNodes[0].nodeValue);
    fetchWeatherData(dealWithWeather,postal);
    }

    @ll contributor (crazyvivek, Durben, Ian,...) : sorry, but few time to code at the moment. If you want the complete theme to see how it work, i can give you a link (=> PM).

    Oups, forget to update the weather if location don't change. I correct the code.
    Last edited by Dacal; 03-07-2012 at 02:11 PM.

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

    bombmom (03-07-2012), chevymusclecar (03-07-2012), chg128 (03-08-2012), crazyvivek (03-07-2012), Destan (03-07-2012), Ian Nicoll (03-07-2012), lostinthemes (03-09-2012), phil73 (03-07-2012), rasputin007 (03-08-2012), Schnedi (03-07-2012), stratnik (03-08-2012), The_Durben (03-07-2012)

  6. #464
    Since Mylocation is needed for this and that only works for ios 5 ..are there any other gps apps that someone not on ios 5 can use to make this work? I'm dying here not being able to use this .

  7. #465
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    Quote Originally Posted by Ian Nicoll View Post
    Please correct me if I'm wrong, If we move to another location, and the app changes the coordinates, then the widgets update automatically because the location.txt file has been re-written? Os we don't need to refresh every 20 minutes?
    Can anyone explain exactly how it works or do I have the right idea on how this updates itself?

    If so, which part of the code tells the widgets to change location because the text file coordinates have changed?

    Thanks wise men.
    It's in the GetLocation_Weather.js UpdateLocation() function
    After the first run, when it creates the first myLocation.txt file, it has values for the latidute and longitude, at the end of that function those values get passed on into different variables
    prevlatitude = latitude;
    prevlongitude = longitude;
    After a specified setInterval the updateLocation() function starts again, but now it compares
    if (prevlatitude != latitude || prevlongitude != longitude)
    are they the same then no refresh, are they different then it runs through all those scripts, fetches the Yahoo responses and builds a new updated lockscreen.
    My lockscreen updates automatically when I am on the move (school run for 10 miles), use a TomTom carkit to hold the phone and is connected to car stereo.

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

    chevymusclecar (03-08-2012), Ian Nicoll (03-07-2012), The_Durben (03-07-2012)

  9. #466
    Quote Originally Posted by poofster1 View Post
    Since Mylocation is needed for this and that only works for ios 5 ..are there any other gps apps that someone not on ios 5 can use to make this work? I'm dying here not being able to use this .

    i have a friend (indyzzz) that confirmed it's working on iOS4!!

    this is his screenshot


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

    chevymusclecar (03-08-2012), chg128 (03-08-2012), poofster1 (03-07-2012), stratnik (03-08-2012), The_Durben (03-07-2012)

  11. #467
    Quote Originally Posted by Dacal View Post
    Hi @ll,

    I rework the code a little (as i don't know jQuery, i replace with some classic AJAX functions, for me it's more easy to integrate). Here is my main code for the GetLocation_weather.js :




    @ll contributor (crazyvivek, Durben, Ian,...) : sorry, but few time to code at the moment. If you want the complete theme to see how it work, i can give you a link (=> PM).

    Oups, forget to update the weather if location don't change. I correct the code.
    Hey Dacal, if I replace my location.js with this everything else should still work correct?

  12. #468
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    Quote Originally Posted by poofster1 View Post
    Since Mylocation is needed for this and that only works for ios 5 ..are there any other gps apps that someone not on ios 5 can use to make this work? I'm dying here not being able to use this .
    You could try to edit the Info.plist file and change the details to your iOS detail
    <key>DTPlatformBuild</key>
    <string>9A334</string>
    <key>DTPlatformName</key>
    <string>iphoneos</string>
    <key>DTPlatformVersion</key>
    <string>5.0</string>
    <key>DTSDKBuild</key>
    <string>9A334</string>
    <key>DTSDKName</key>
    <string>iphoneos5.0</string>
    <key>DTXcode</key>
    <string>0421</string>
    <key>DTXcodeBuild</key>
    <string>4D502</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>MinimumOSVersion</key>
    <string>5.0</string>
    But you would do that on your own responsibility.
    I don't claim intellectual property on this one

  13. The Following 4 Users Say Thank You to rasputin007 For This Useful Post:

    chg128 (03-08-2012), Ian Nicoll (03-07-2012), poofster1 (03-07-2012), stratnik (03-08-2012)

  14. #469
    Quote Originally Posted by The_Durben View Post
    Hey Dacal, if I replace my location.js with this everything else should still work correct?
    Did for me. Thanks Dacal!

  15. The Following 4 Users Say Thank You to bombmom For This Useful Post:

    chevymusclecar (03-07-2012), Ian Nicoll (03-07-2012), stratnik (03-08-2012), The_Durben (03-07-2012)

  16. #470
    Quote Originally Posted by bombmom View Post
    Did for me. Thanks Dacal!
    Me too I just tried but it drops the coordinates text being visible on screen.
    Not a big deal as it works but I wanted to show that.

  17. #471
    Quote Originally Posted by The_Durben View Post
    Me too I just tried but it drops the coordinates text being visible on screen.
    Not a big deal as it works but I wanted to show that.
    Coordinates are stored in a 'coordinates' element in my main.js. you just have to do the same thing


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

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

    bombmom (03-07-2012), Ian Nicoll (03-07-2012), The_Durben (03-07-2012)

  19. #472
    Schnedi

    Well i found this download and install it and then had to edit the mylocation.txt to mine and then copy and paste the mylocation.txt to var/mobile/documents resprung and YIPPEE!!! I now have the exact same locscreen as indyzz.....THANK YOU ..now to mod and see what else works....have moved from my location to see what works tho....THANKS again ALL

    ipod touch 2g ios4.21


    Rasputin..

    Thanks i did change all the 5.0 to 4.0 in the info.plist and changed nothing else...don't know if that helped but i'm not changing them back
    Last edited by poofster1; 03-07-2012 at 05:47 PM.

  20. #473
    King Kong ain't got nothing on me! King_O_Hill's Avatar
    Join Date
    Apr 2011
    Location
    USA
    Posts
    9,511
    Thanks
    42,180
    Thanked 17,966 Times in 6,531 Posts

    OK, i have been following this the best that i can. I installed this early on with the initial release and had no problems. i modded it a little to suit me. Now i would like to move forward with some of the newly added features. My question is, i want to install "EPHDiOS5 GPS Weather", but i am not sure if i can just install on top of the installation that i already have, or if i need to remove what i have and start anew?

  21. #474
    Quote Originally Posted by King_O_Hill View Post
    OK, i have been following this the best that i can. I installed this early on with the initial release and had no problems. i modded it a little to suit me. Now i would like to move forward with some of the newly added features. My question is, i want to install "EPHDiOS5 GPS Weather", but i am not sure if i can just install on top of the installation that i already have, or if i need to remove what i have and start anew?
    Clear your MyLocation app from the task switcher if it's there.
    Then manually delete the app and do a reboot (not respring)
    Then install the one from the repo and you'll be good.
    The EPHD GPS Weather theme will also install and work.

    In your own mod of the weather theme change your path to the text file in the weather location js to this

    *function UpdateLocation() { *

    * * * * * * * * jQuery.get('../../../../var/mobile/Documents/myLocation.txt', function(appdata) {

    And that one will also work. (not the stars * remove those when you copy it)

  22. The Following 4 Users Say Thank You to The_Durben For This Useful Post:

    chg128 (03-08-2012), Ian Nicoll (03-07-2012), King_O_Hill (03-07-2012), Schnedi (03-08-2012)

  23. #475
    King Kong ain't got nothing on me! King_O_Hill's Avatar
    Join Date
    Apr 2011
    Location
    USA
    Posts
    9,511
    Thanks
    42,180
    Thanked 17,966 Times in 6,531 Posts

    Thanks for the quick reply, I will try as soon as i am free to concentrate here in a few.

    EDIT:

    It worked like a charm! i made the edit to my original LS and it works too!

    Thanks for your help and everyone that worked to make this possible! You guys so Rock!
    Last edited by King_O_Hill; 03-07-2012 at 09:10 PM.

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

    The_Durben (03-07-2012)

  25. #476
    Modder & Coder Ian Nicoll's Avatar
    Join Date
    Oct 2008
    Location
    From Scotland, live in the Philippines.
    Posts
    5,036
    Thanks
    7,855
    Thanked 19,908 Times in 3,997 Posts

    My UniAW still doesn't auto update when changing locations, I'm now thinking it's something about PerPageHTML+, any of you guys got this autoupdating with a "PerPage" widget or are you all using WinterBoard widgets?
    Thanks.

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

  26. #477
    Quote Originally Posted by Ian Nicoll View Post
    My UniAW still doesn't auto update when changing locations, I'm now thinking it's something about PerPageHTML+, any of you guys got this autoupdating with a "PerPage" widget or are you all using WinterBoard widgets?
    Thanks.
    Sorry, i don't use PerPageHTML. Only winterboard for now.

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

    Ian Nicoll (03-08-2012)

  28. #478
    Modder & Coder Ian Nicoll's Avatar
    Join Date
    Oct 2008
    Location
    From Scotland, live in the Philippines.
    Posts
    5,036
    Thanks
    7,855
    Thanked 19,908 Times in 3,997 Posts

    Quote Originally Posted by Dacal View Post
    Sorry, i don't use PerPageHTML. Only winterboard for now.
    Hi Dacal,

    I see you use in your "Config.js" file "var locale = 0;
    Does this mean that if they put the usual code it would work without GPS and zero uses GPS?

    Thanks again M8.

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

  29. #479
    Quote Originally Posted by Ian Nicoll View Post
    Hi Dacal,

    I see you use in your "Config.js" file "var locale = 0;
    Does this mean that if they put the usual code it would work without GPS and zero uses GPS?

    Thanks again M8.
    Yes, exactly. Don't want to create 2 widgets, but one with the 2 options : GPS based or "classic". I test the locale variable in the main.js.

    If == 0 => GPS based
    If != 0 => Classic.

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

    chevymusclecar (03-08-2012), Ian Nicoll (03-08-2012), rasputin007 (03-08-2012), The_Durben (03-08-2012)

  31. #480
    Quote Originally Posted by Ian Nicoll View Post
    My UniAW still doesn't auto update when changing locations, I'm now thinking it's something about PerPageHTML+, any of you guys got this autoupdating with a "PerPage" widget or are you all using WinterBoard widgets?
    Thanks.
    Hi Ian I do believe perpage is the culprit as I tested today with a 60 min refresh interval as I was traveling through cities...it did not refresh before 60min but with refresh a five minutes it then knew my location in that time frame will set the widget for winter board and drive in to work tomorrow to test

    Good times and good night.

    Thank you Dacal very nice bro!!

  32. The Following 6 Users Say Thank You to chevymusclecar For This Useful Post:

    chg128 (03-08-2012), Dacal (03-08-2012), Ian Nicoll (03-08-2012), Sheff1889 (03-08-2012), stratnik (03-08-2012), The_Durben (03-08-2012)

Page 24 of 136 FirstFirst ... 142223242526 34 74 124 ... 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
  •