Page 3 of 3 FirstFirst 123
Results 41 to 52 of 52

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


Thread: Request JavaScript Help for Live MoonPhase addition to Vista Bliss

  1. #41
    Theme Creator Doreen's Avatar
    Join Date
    Jul 2007
    Location
    Southern California
    Posts
    2,620
    Thanks
    2,755
    Thanked 2,582 Times in 1,193 Posts

    Hello Spamdumpster I'll have to leave that up to you guys cuz I'm lost in all this (It's not my forte) but this morning after radarlove read my post here about the daytime issue he sent me a file that allows the sun icon out and hides the moon during the day and at night the moon comes out, I suppose it was the same principle as you did when you used your daughters photo to display instead of the transparent image but replacing that w/ a sun and it works. So I went ahead and packaged up my Overlay weather condition icons that have all the suns and moons dissected from them and made a quick theme and this is the result when you put his theme underneath my Overlay icon theme.

    As you can see the sun is out during the day and the overlay weather condition icon is out displaying correctly cuz when it rained it changed from a cloud to rain the issue is that I can't seem to get it in front of the sun/moon it wants to display behind it. Also the weather "wallpaper" disappears when I layered these two themes in WinterBoard and only shows a black bg.
    Attached Thumbnails Attached Thumbnails -004.png   -009.png  
    Last edited by Doreen; 02-23-2009 at 10:08 PM.

  2. The Following User Says Thank You to Doreen For This Useful Post:

    Blik (02-24-2009)

  3. #42
    Quote Originally Posted by Spamdumpster View Post
    Guys and Gals: Copy this file over the Wallpaper.html in Doreen's weather widget. IT uses the yahoo source, but I've added a script to the html to caluclate the moondata (by formula, no pulling from external source), and then to add the data to the top of the screen like this:



    I found the code through a google search. I don't have any more time to work on it today, but I figure that if this Code can write the moonphase info, you guys should be able to translate it into an image.

    This preserved the goal of using the yahoo weathersource.

    Great find. Was able to pull the source code.
    EDIT:
    This may come in handy. I have a situation where I use my laptop for getting wifi. For some reason I cant get an accuweather update to th iPhone. Laptop gets the feed with no problems. (Everything else on the iPhone works so its a puzzle). Once I hit any other wifi or 3G I am good.


    I am really liking my screen. Got some compliments already. But then again I am not bashful about showing it off.
    Last edited by radarlove63; 02-25-2009 at 02:50 PM. Reason: Clarification needed.

  4. The Following User Says Thank You to radarlove63 For This Useful Post:

    Blik (02-24-2009)

  5. #43
    This looks great...........I don't have any skills like all of you but can't wait for the finished product.

    Thanks to all of you for your great work

  6. #44
    Default See first post of this thread for Live Moon Phase File
    The 1st post of this thread has been updated. It contains a link to the file needed.

  7. #45
    Theme Creator Doreen's Avatar
    Join Date
    Jul 2007
    Location
    Southern California
    Posts
    2,620
    Thanks
    2,755
    Thanked 2,582 Times in 1,193 Posts

    Spamdumpster, I want to say "Thank you" radarlove just would not give up and this is the result! Animated bg's w/ moon phases and overlay icons.

  8. The Following User Says Thank You to Doreen For This Useful Post:

    radarlove63 (02-25-2009)

  9. #46
    Default Well you just have to look at this
    Got the second one off the lot.
    Oh what is in store.......



    Doreen this is absolutely great.

    Quote Originally Posted by Blik View Post
    This looks great...........I don't have any skills like all of you but can't wait for the finished product.

    Thanks to all of you for your great work
    Hi Blik,
    Your Welcome.
    If it weren't for Spamdumpster hitting that code and Doreens inspiration this wouldn't have happened. All I did was ask a question. (Ok I did a teeny bit more).

    The first post has been updated now with 2 files to choose from. Doreen is working her theme to really integrate this. Keep a lookout.

    Quote Originally Posted by Spamdumpster View Post
    Doreen and Radarlove,

    After doing some research, it looks like most widgets, programs, and websites that provide moonphase informaiton use an algorithm to calculate the moonphase. For example, check out this code here.

    The benefit of doing it this way is that it would be easy to incorporate into any widget without having to pull the data from a feed. Plus, you could easily use all 40 moon images from Moondock. I will look into this when I have a chance.
    Spamdumpster,
    This will be the direction I think I want to take it to. Doreen is working on her next level to her theme and the timing of when the updates occur with her background and the phases could probably be best tighten up in this manner.
    Again, thanks for the link. I will be poring over it for a bit and see what I can do.
    Last edited by radarlove63; 02-26-2009 at 11:53 AM. Reason: Automerged Doublepost

  10. #47
    Quote Originally Posted by radarlove63 View Post
    Spamdumpster,
    This will be the direction I think I want to take it to. Doreen is working on her next level to her theme and the timing of when the updates occur with her background and the phases could probably be best tighten up in this manner.
    Again, thanks for the link. I will be poring over it for a bit and see what I can do.
    Cool, I think that the trick is to pull the javascript out of the wallpaper.html file and into the source or wallpaper.js script. Let me know how you're progressing, I may have to get back into this over the weekend.

  11. #48
    Quote Originally Posted by Spamdumpster View Post
    Cool, I think that the trick is to pull the javascript out of the wallpaper.html file and into the source or wallpaper.js script. Let me know how you're progressing, I may have to get back into this over the weekend.
    Getting deeper into this than I originally had thought. And a major rethink is happening.

    Now I am trying to get my mind around the else if script you have for the time when the blank or moon phase image comes up.

    I am staring at it an wondering if instead of a set time could it be referenced to the current days sunrise and sunset?

    I know your original coding for the almanac shows that data on the screen. Do you think it could be set to fetch the current days sunrise and sunset times and then pull up the Sun/blank image based on the device time?

    I am getting some additional help in this.
    Trying to implent the following code but can't get over the hurdle:
    Code:
    function stime(){};
    
    stime.prototype = {
       h:0,
       m:0,
    
       parse:function(s){
          this.h = s.replace(/(d{2}:d{2}/,"$1");
          this.m = s.replace(/d{2}:(d{2})/,"$1");
       },
       before:function(ph, pm){
          return ((ph < this.h) || (ph == this.h && pm < this.m));
       },
       after:function(ph, pm){
          return !this.before(ph,pm);
       }
    };
    
    setValue("obj.sunrise", Sunrise);
    setValue("obj.sunset", Sunset);
    
    var StartSun = getValue("Sunrise");
    var StartMoon = getValue("Sunset");
    
    
    var currentTime = new Date();
    var hours = currentTime.getHours();
    var minutes = currentTime.getMinutes();
    var sunr = new stime();
    sunr.parse(StartSun);
    var suns = new stime();
    suns.parse(StartMoon);
    if(sunr.after(hours,minutes) && suns.before(hours,minutes)){
       obj.moonday = '99';
    }
    Seems like the idea is close but can't make the final aaahhh haaa.
    I'll tell you tho if it could work it would make the whole thing much closer to "Live" though.

    Well I will adjust and continue to respring.LOL.

    Thanks in advance Spamdumpster.
    Last edited by radarlove63; 03-09-2009 at 04:01 PM. Reason: Took out Grease Monkey code (GM_)

  12. #49
    Quote Originally Posted by Spamdumpster View Post
    All -- I created an Almanac widget a few weeks ago with changing moonphase images that easily could be modded to use for this project (EDIT: iBlade's theme referenced above is actually based on my code). It's a widget -- not a MS extension, so it would have to be integrated into Doreen's widget that handles the homescreen background, as radarlove63 suggested. The only thing is that I think it would require the use of the accuweather feed, because yahoo's weather feed does not provide moonphase information.

    Here's the link to the thread at macthemes where I released the widget. Link . Check it out.

    As I said, it very easily could be modded to remove all of the other information and only display the moon image.

    The moon images are small in my widget, but they're beautiful renders that would look great in any size on the iPhone. The images are from the os x app Moondock by Gary C. Matin, used with his permission. He also has a separate set of moon images for viewing from the southern hemisphere. I would be glad to contact him for permission to sue in connection with this project.

    Let me know what you think.
    Spamdumpster,
    I was just going back through this thread.
    I noticed the
    The images are from the os x app Moondock by Gary C. Matin, used with his permission. He also has a separate set of moon images for viewing from the southern hemisphere. I would be glad to contact him for permission to sue in connection with this project.
    I don't think you were asked to pursue this. I will ask now. Could you?
    If need be I will pull the links.
    Doreen is so busy but she did mention looking for other images. I don't wan't the thief label though.
    Thanks

  13. #50
    Theme Creator Doreen's Avatar
    Join Date
    Jul 2007
    Location
    Southern California
    Posts
    2,620
    Thanks
    2,755
    Thanked 2,582 Times in 1,193 Posts

    Hello radar I'm jumping back on this and will have it ready for release tomorrow okay, sorry for the delay...

  14. #51
    Can't Wait Doreen

    I had to get my Iphone Replaced this past Saturday.......So I am in process of putting everything back

    This will be SWEET

  15. #52
    Default Well I'm Stuck
    Hopefully the code I posted in post #48 will jostle an idea that works.
    I have hacked and rehacked, but I am a novice and have not been able to figure out how to get the moon and sun in sync with the accuweather sunrise sunset times.

    Anyone that stumbles by please take a look at it.

    This will more than likely tighten up the timing on Doreen's updated theme. May not be exactly perfect timing but should be close.

    I am not throwing my hands in the air quite yet. I will have some additional resources available mid next week that may be able to help out. Till then I will play around as much as time allows.

Page 3 of 3 FirstFirst 123
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •