Results 1 to 11 of 11

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


Thread: Need some one good at html

  1. #1
    Livin the iPhone Life heath_rox's Avatar
    Join Date
    Nov 2007
    Location
    Liberty City
    Posts
    1,292
    Thanks
    120
    Thanked 205 Times in 117 Posts

    Default Need some one good at html
    hi guys im trying to make a html clock for winter-board
    ive got the code now (see last post)
    but when i try to combine the date element with the time element
    it appears like this


    12:38PM Friday, Semptember 26

    but i want it like this


    ......12:38PM
    Friday,September 26
    (pretend the dots arnt there the Post thing keeps moving it)

    could any one help me compile this so its like what i want

    heres the date part


    HTML Code:
    <script language="Javascript">
    <!-- Gracefully hide from old browsers
    var this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")	//predefine weekday names
    var this_month_name_array = new Array("January","February","March","April","May","June","July","August","September","October","November","December")	//predefine month names
    
    var this_date_timestamp=new Date()	//get current day-time stamp
    
    var this_weekday = this_date_timestamp.getDay()	//extract weekday
    var this_date = this_date_timestamp.getDate()	//extract day of month
    var this_month = this_date_timestamp.getMonth()	//extract month
    var this_year = this_date_timestamp.getYear()	//extract year
    
    if (this_year < 1000)
    	this_year+= 1900;	//fix Y2K problem
    if (this_year==101)
    	this_year=2001;		//fix Netscape browsers - it displays the year as being the year 101!
    
    var this_date_string = this_weekday_name_array[this_weekday] + ", " + this_month_name_array[this_month] + " " + this_date  //concat long date string
    // -->
    
    </script>
    <script language="JavaScript">document.write(this_date_string)</script>


    and heres the time part


    HTML Code:
    <html>
    <head><title>Clock</title></head>
    <style>
        DIV#clock {
            margin-top: 40px; 
            margin-right: 213px; 
            font-family: Helvetica; 
            text-align: center;
            color: #000;
            
    font-size: 30px;
    }
        }    </style>
    
    <script type="text/javascript">
    <!--
    var this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saterday")    
    
    var this_date_timestamp=new Date()    
    
    var this_weekday = this_date_timestamp.getDay()    
    var this_date = this_date_timestamp.getDate()    
    var this_month = this_date_timestamp.getMonth()    
    var this_year = this_date_timestamp.getYear()    
    
    if (this_year < 1000)
        this_year+= 1900;
    if (this_year==101)
        this_year=2001;        
    
    var this_date_string = this_weekday_name_array[this_weekday] + ", "
    // -->
    function init ( )
    {
      timeDisplay = document.createTextNode ( "" );
      document.getElementById("clock").appendChild ( timeDisplay );
    }
    
    function updateClock ( )
    {
      var currentTime = new Date ( );
    
      var currentHours = currentTime.getHours ( );
      var currentMinutes = currentTime.getMinutes ( );
      var currentSeconds = currentTime.getSeconds ( );
    
      // Pad the minutes and seconds with leading zeros, if required
      currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
      currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
    
      // Choose either "AM" or "PM" as appropriate
      var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
    
      // Convert the hours component to 12-hour format if needed
      currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
    
      // Convert an hours component of "0" to "12"
      currentHours = ( currentHours == 0 ) ? 12 : currentHours;
    
      // Compose the string for display
      var currentTimeString = currentHours + ":" + currentMinutes + timeOfDay;
    
      // Update the time display
      document.getElementById("clock").firstChild.nodeValue = currentTimeString;
    }
    
    // -->
    </script>
    
    <body onload="updateClock(); setInterval('updateClock()', 1000 )">
        <div id="clock"> 
        </div>
        </body>
    </html>


    thanks so much in advance!

    cmon somebody's gotta know how to do it
    Last edited by heath_rox; 2008-09-27 at 09:21 AM.
    "Its better to be a pirate than join the navy"Steve Jobs

  2. #2
    something like this?
    Attached Files Attached Files

  3. The Following User Says Thank You to h.abdulhamid86 For This Useful Post:

    heath_rox (2008-09-27)

  4. #3
    Livin the iPhone Life heath_rox's Avatar
    Join Date
    Nov 2007
    Location
    Liberty City
    Posts
    1,292
    Thanks
    120
    Thanked 205 Times in 117 Posts

    o my god i will have your babies!
    how can i ever re-pay you?
    is it ok if i put it in a theme i upload i will write your name in big BOLD letters on the post
    hey is there any chance you can make the PM/AM one size smaller than the date?
    thanks again
    Last edited by heath_rox; 2008-09-27 at 01:05 PM.
    "Its better to be a pirate than join the navy"Steve Jobs

  5. #4
    ^^ I hope your a chic heath LOL

    Anyway, how to you apply this theme?

  6. #5
    ok heath. i got it so the am/pm can be modified independently of the time. however, i couldn't get it to completely line up with the time (because of the size difference). it either has to be slightly below (where it is now) or it can be in the middle or slightly above. let me know.

    re: Bear Hunter
    the file attached is just an html file with code. i believe heath is using it as a component to a theme, as it is not a theme itself. but, winterboard alows dynamic backgrounds, meaning you can have an html file as your background (Wallpaper.html). This opens the door to lots of cool stuff, like fading transitions to multiple wallpapers, video wallpaper, or...having the time and date displayed.
    Attached Files Attached Files

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

    Bear Hunter (2008-09-27), heath_rox (2008-09-27)

  8. #6
    Livin the iPhone Life heath_rox's Avatar
    Join Date
    Nov 2007
    Location
    Liberty City
    Posts
    1,292
    Thanks
    120
    Thanked 205 Times in 117 Posts

    Quote Originally Posted by Bear Hunter View Post
    ^^ I hope your a chic heath LOL

    Anyway, how to you apply this theme?
    heres a preview of it http://www.modmyi.com/forums/new-ski...fection-2.html
    i have not released it yet ETA is monday

    Quote Originally Posted by h.abdulhamid86 View Post
    ok heath. i got it so the am/pm can be modified independently of the time. however, i couldn't get it to completely line up with the time (because of the size difference). it either has to be slightly below (where it is now) or it can be in the middle or slightly above. let me know.
    its fine how it is thanks so much again!
    Last edited by heath_rox; 2008-09-27 at 04:40 PM. Reason: Automerged Doublepost
    "Its better to be a pirate than join the navy"Steve Jobs

  9. #7
    Quote Originally Posted by h.abdulhamid86 View Post
    ok heath. i got it so the am/pm can be modified independently of the time. however, i couldn't get it to completely line up with the time (because of the size difference). it either has to be slightly below (where it is now) or it can be in the middle or slightly above. let me know.

    re: Bear Hunter
    the file attached is just an html file with code. i believe heath is using it as a component to a theme, as it is not a theme itself. but, winterboard alows dynamic backgrounds, meaning you can have an html file as your background (Wallpaper.html). This opens the door to lots of cool stuff, like fading transitions to multiple wallpapers, video wallpaper, or...having the time and date displayed.
    Sweet...thanks for the info man. Is there anyway to mod the code to show 24hr clock?

    Quote Originally Posted by heath_rox View Post
    heres a preview of it http://www.modmyi.com/forums/new-ski...fection-2.html
    i have not released it yet ETA is monday



    its fine how it is thanks so much again!
    Looking forward to it
    Last edited by Bear Hunter; 2008-09-27 at 06:47 PM. Reason: Automerged Doublepost

  10. #8
    alrgith folks, here is version 1.3 (lol) of clock html. i renamed it Wallpaper.html, as this is what it needs to be named to work in winterboard. also, i place a background="" attribute in the body tag. to put in your wallpaper, just place the image in the same folder as Wallpaper.html, and put the file name between the quotes (i.e. background="pic.png").


    Quote Originally Posted by Bear Hunter View Post
    Sweet...thanks for the info man. Is there anyway to mod the code to show 24hr clock?
    and for you Bear Hunter.... Wallpaper24.html. remember to change it to Wallpaper.html.

    and btw, DONT FORGET TO SET PERMISSIONS TO 755!!!

    enjoy.
    Attached Files Attached Files

  11. The Following 3 Users Say Thank You to h.abdulhamid86 For This Useful Post:

    Bear Hunter (2008-09-28), heath_rox (2008-09-28), jabbawalkee (2008-09-28)

  12. #9
    ok...back again. realized you needed the font to be white, based on your theme pic. incase you didn't know how, i changed it for you.

    Wallpaper.html 1.2.1 lol
    Attached Files Attached Files

  13. The Following User Says Thank You to h.abdulhamid86 For This Useful Post:

    heath_rox (2008-09-28)

  14. #10
    Livin the iPhone Life heath_rox's Avatar
    Join Date
    Nov 2007
    Location
    Liberty City
    Posts
    1,292
    Thanks
    120
    Thanked 205 Times in 117 Posts

    thanks sooo much again
    edit: it makes the background black any way i can make it show my wallpaper
    Last edited by heath_rox; 2008-09-28 at 03:03 AM.
    "Its better to be a pirate than join the navy"Steve Jobs

  15. #11
    Quote Originally Posted by h.abdulhamid86 View Post
    alrgith folks, here is version 1.3 (lol) of clock html. i renamed it Wallpaper.html, as this is what it needs to be named to work in winterboard. also, i place a background="" attribute in the body tag. to put in your wallpaper, just place the image in the same folder as Wallpaper.html, and put the file name between the quotes (i.e. background="pic.png").




    and for you Bear Hunter.... Wallpaper24.html. remember to change it to Wallpaper.html.

    and btw, DONT FORGET TO SET PERMISSIONS TO 755!!!

    enjoy.
    Awesome my friend!

    I've never used html as wallpaper before....I'm going to give it a shot right now, and try and get it to work!

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