Page 20 of 136 FirstFirst ... 101819202122 30 70 120 ... LastLast
Results 381 to 400 of 2706

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


Thread: GPS Based HTML Lockscreen Weather Theme

  1. #381
    woeid is same format as Ian's uniAW widget : woeid returned by GPS weather code is a 123456 format. I integrated GPS weather code with success in BaSalt widget (Ian is using nearly the same code, it's mine , so it must work for him too).

    Unfortunatly, for now, it broke my slideshow widget (if didn't have a response from yahoo, my widget turn to a slideshow). Need to have a close look on that.



    For Ian, here is the GetLocation_weather.js i use. I call the refresh script directly in the JQuery function.

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

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

    function UpdateLocation() {
    jQuery.get('../../../../var/mobile/Documents/myLocation.txt', function(appdata) {
    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) {
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R&flags=J";
    $.getJSON(url, function(data) {
    woeid = data.ResultSet.Results[0].woeid;

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

    document.getElementById("coordinates").innerHTML = textLat + " " + textLong;
    prevlatitude = latitude;
    prevlongitude = longitude;

    validateWeatherLocation(escape(woeid).replace(/^%u/g, "%"), setPostal);

    });
    }
    });
    }
    Last edited by Dacal; 03-06-2012 at 04:49 PM.

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

    bombmom (03-06-2012), hemptation (04-05-2012), Ian Nicoll (03-06-2012), laurence0609 (03-07-2012), rasputin007 (03-06-2012), Schnedi (03-06-2012), Sheff1889 (03-07-2012)

  3. #382
    I was waiting for this Dacal, get it done mate. We are waiting for this with Basalt Hd !!!

  4. #383
    Livin the iPhone Life KraXik's Avatar
    Join Date
    Mar 2011
    Location
    Winchester, UK
    Posts
    2,634
    Thanks
    2,684
    Thanked 1,757 Times in 894 Posts

    Yay!!! Go Dacal!!!

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

    Ian Nicoll (03-06-2012)

  6. #384
    Quote Originally Posted by stratnik View Post
    BTW Schnedi can you post the code line for the humidity?
    dang!! i saw your post i forgot to answer, sorry!

    you can get it from my EPHD vertical widget or PM later and i'll send it to you. but PM cause i'll forget it for sure! my memorie is not really good.

  7. The Following User Says Thank You to Schnedi For This Useful Post:

    stratnik (03-07-2012)

  8. #385
    Quote Originally Posted by Dacal View Post
    woeid is same format as Ian's uniAW widget : woeid returned by GPS weather code is a 123456 format. I integrated GPS weather code with success in BaSalt widget (Ian is using nearly the same code, it's mine , so it must work for him too).

    Unfortunatly, for now, it broke my slideshow widget (if didn't have a response from yahoo, my widget turn to a slideshow). Need to have a close look on that.



    For Ian, here is the GetLocation_weather.js i use. I call the refresh script directly in the JQuery function.
    This is awesome Dacal! Now can you explain "I call the refresh script directly in the JQuery function" ? If not I do understand and will wait for you to update this for your theme.

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

    The_Durben (03-06-2012)

  10. #386
    Quote Originally Posted by bombmom View Post
    This is awesome Dacal! Now can you explain "I call the refresh script directly in the JQuery function" ? If not I do understand and will wait for you to update this for your theme.
    I don't know very well jQuery (but i must learn, i opened a lot of pages on it now . At the beginning, i just tried to pass the woeid variable to my script (to replace the locale variable i use, it's the same format), but it didn't work. The variable seems to be only available in the jQuery function, it's why i call the refresh function by including the line below in the jQuery function :

    validateWeatherLocation(escape(woeid).replace(/^%u/g, "%"), setPostal);

    It's a workaround. Need to make something more clean .

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

    bombmom (03-06-2012), The_Durben (03-06-2012)

  12. #387
    Quote Originally Posted by jjk454ss View Post
    After figuring out my own stupid mistake I finally got this working. I kept copying the UUID into where it says //Example UUID:.

    Hey jjk454ss,

    I really like this lockscreen! Do you mind sharing your overlay and the slider? Thanks!

  13. #388
    Quote Originally Posted by Dacal View Post
    woeid is same format as Ian's uniAW widget : woeid returned by GPS weather code is a 123456 format. I integrated GPS weather code with success in BaSalt widget (Ian is using nearly the same code, it's mine , so it must work for him too).

    Unfortunatly, for now, it broke my slideshow widget (if didn't have a response from yahoo, my widget turn to a slideshow). Need to have a close look on that.



    For Ian, here is the GetLocation_weather.js i use. I call the refresh script directly in the JQuery function.
    Hey Dacal
    If I wanted to add this to a uniaw mod I did, what else am I editing?
    I add the GetWeather js to the JavaScript folder and add the script source to the html
    Lost after that

    Quote Originally Posted by Jephre View Post
    Hey jjk454ss,

    I really like this lockscreen! Do you mind sharing your overlay and the slider? Thanks!
    The slider is from EPHD theme
    Last edited by The_Durben; 03-06-2012 at 05:26 PM.

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

    Ian Nicoll (03-06-2012), Sheff1889 (03-07-2012)

  15. #389
    Hi, has anybody an idea why i get the sunset picture on my screen but the sunrise picture not ?

    -img_0059.png
    Edit: Sometimes i shuold think before i write ... problem solved. Sorry.
    Last edited by jotka; 03-07-2012 at 02:48 AM.

  16. #390
    Quote Originally Posted by The_Durben View Post
    Hey Dacal
    If I wanted to add this to a uniaw mod I did, what else am I editing?
    I add the GetWeather js to the JavaScript folder and add the script source to the html
    Lost after that
    Put only the code i include above in the GetLocation_Weather.js. You also need to copy jquery library in you javascript folder.
    Put the line in you HTML.

    For me, it looks like that :

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, user-scalable=no" />
    <link rel="stylesheet" href="Resources/Css/Main/Lock.css" type="text/css" media="screen" />
    <script type="text/javascript" charset="utf-8" src="Setup/Config.js"/></script>
    <script type="text/javascript" charset="utf-8" src="Resources/JavaScript/Main/jquery.min.js"/></script>
    <script type="text/javascript" charset="utf-8" src="Resources/JavaScript/Main/Main.js"/></script>
    <script type="text/javascript" charset="utf-8" src="Resources/JavaScript/Main/GetLocation_Weather.js"/></script>
    </head>
    For uniAW (sorry, don't have the widget on this computer), open the main javascript file (one from uniAW) and search for the line "validateWeatherLocation(escape(woeid).replace (/^%u/g, "%"), setPostal);" (in init/onload function, i think) => replace with "UpdateLocation();".

    Not very clean, but it work.

    Forgot ! I include a line to have coordinates (document.getElementById("coordinates").innerHTML = textLat + " " + textLong. Need to add a div in the HTML and appropriate section in CSS. For testing purpose, just delete this line.
    Last edited by Dacal; 03-06-2012 at 05:45 PM.

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

    bombmom (03-06-2012), hemptation (04-05-2012), Ian Nicoll (03-06-2012), laurence0609 (03-07-2012), Schnedi (03-07-2012), Sheff1889 (03-07-2012), stratnik (03-07-2012), The_Durben (03-06-2012)

  18. #391
    Quote Originally Posted by Jephre View Post
    Hey jjk454ss,

    I really like this lockscreen! Do you mind sharing your overlay and the slider? Thanks!
    I thought the overlay was in this thread, towards the very beginning. Otherwise its in the EPHD thread, but I don't have it anymore, I've changed widgets too many times since.

    The slider is from EPHD.

  19. #392
    Quote Originally Posted by bombmom View Post
    Ian's widget calls for something like var locale=4140 so it's the woeid code that is my problem with it too as it doesnt use var locale="CAXX0677" any more
    Ah, that explains a lot, because the location.js provides the old style weather location ID like UKXX0085 and not the woeid. The original GetLocation_Weather.js gets that.
    I needed that old style weather location ID as only that will provide a 5 day forecast on the xml.weather.yahoo.com.
    Cool, problem found!

  20. The Following 6 Users Say Thank You to rasputin007 For This Useful Post:

    bombmom (03-06-2012), Dacal (03-06-2012), Ian Nicoll (03-06-2012), metaserph (03-06-2012), stratnik (03-07-2012), The_Durben (03-06-2012)

  21. #393
    Quote Originally Posted by Dacal View Post
    Put only the code i include above in the GetLocation_Weather.js. You also need to copy jquery library in you javascript folder.
    Put the line in you HTML.

    For me, it looks like that :



    For uniAW (sorry, don't have the widget on this computer), open the main javascript file (one from uniAW) and search for the line "validateWeatherLocation(escape(woeid).replace (/^%u/g, "%"), setPostal);" (in init/onload function, i think) => replace with "UpdateLocation();".

    Not very clean, but it work.

    Forgot ! I include a line to have coordinates (document.getElementById("coordinates").innerHTML = textLat + " " + textLong. Need to add a div in the HTML and appropriate section in CSS. For testing purpose, just delete this line.
    Awesome thanks man.
    Where's the coordinates line go?

    I'll have to try this later, just made changes and messed up somewhere, gotta redownload my uniaw widget
    Can't find what I messed up.
    Appreciate the help man

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

    hemptation (04-05-2012), Ian Nicoll (03-06-2012), laurence0609 (03-07-2012)

  23. #394
    Quote Originally Posted by The_Durben View Post
    Awesome thanks man.
    Where's the coordinates line go?

    I'll have to try this later, just made changes and messed up somewhere, gotta redownload my uniaw widget
    Can't find what I messed up.
    Appreciate the help man
    Let me know if you get it Derrick because its making me scream,lol You know I hate JavaScript/jQuery

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

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

  25. #395
    Quote Originally Posted by The_Durben View Post
    Awesome thanks man.
    Where's the coordinates line go?

    I'll have to try this later, just made changes and messed up somewhere, gotta redownload my uniaw widget
    Can't find what I messed up.
    Appreciate the help man
    Just look on the code i post for Ian .

    In the HTML, i add this :

    <div id="coordinates"></div>

    And in the CSS :

    #coordinates{
    position: absolute;
    text-align: center;
    top: 150px;
    left: 0px;
    width: 320px;
    height: 60px;
    font-size: 20px;
    font-weight: bold;
    color: #DCDCDC;
    text-shadow: #000000 0px 0px 2px, #000000 0px 0px 2px ;
    }

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

    Ian Nicoll (03-06-2012), laurence0609 (03-07-2012), Schnedi (03-07-2012), stratnik (03-07-2012), The_Durben (03-06-2012)

  27. #396
    Okay I now have the weather info showing but not the animations? @Dacal do you have a suggestion where to look for a issue?

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

    Ian Nicoll (03-06-2012)

  29. #397
    Quote Originally Posted by Dacal View Post
    Just look on the code i post for Ian .

    In the HTML, i add this :

    <div id="coordinates"></div>

    And in the CSS :

    #coordinates{
    position: absolute;
    text-align: center;
    top: 150px;
    left: 0px;
    width: 320px;
    height: 60px;
    font-size: 20px;
    font-weight: bold;
    color: #DCDCDC;
    text-shadow: #000000 0px 0px 2px, #000000 0px 0px 2px ;
    }
    Thanks again dude

    @Jenn haven't even started over yet.
    Just about to head home from work. I'll try and mess with it later.

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

    bombmom (03-06-2012), Ian Nicoll (03-06-2012)

  31. #398
    Quote Originally Posted by The_Durben View Post
    Thanks again dude

    @Jenn haven't even started over yet.
    Just about to head home from work. I'll try and mess with it later.
    By them maybe I'll have it Its killing me Big D just killing me...lol First one send it to the other of course

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

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

  33. #399
    Quote Originally Posted by bombmom View Post
    Okay I now have the weather info showing but not the animations? @Dacal do you have a suggestion where to look for a issue?
    Need to see the code... If weather info are present, it must be a minor things to change. I don't know... Late here. In my bed with my iPad. Nite

    Think i solved my slideshow problem. all is fine. Great thread ! Thx to all !
    Last edited by Dacal; 03-06-2012 at 07:17 PM.


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

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

    bombmom (03-06-2012), Ian Nicoll (03-06-2012), King_O_Hill (03-06-2012), laurence0609 (03-07-2012), Sheff1889 (03-07-2012), The_Durben (03-06-2012)

  35. #400
    Quote Originally Posted by Dacal View Post
    Need to see the code... If weather info are present, it must be a minor things to change. I don't know... Late here. In my bed with my iPad. Nite
    Thanks Dacal. G'Night

Page 20 of 136 FirstFirst ... 101819202122 30 70 120 ... 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
  •