The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > Design and Media For the iPhone / iPod Touch > Skinning / Themes Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-25-2008, 09:44 PM
heath_rox's Avatar
Livin the iPhone Life
 
Join Date: Nov 2007
Device + Firmware: 1st Gen IPhone all sizes/unlocked 2.0
Operating System: OSX Leopard
Location: Liberty City
Posts: 1,289
Thanks: 117
Thanked 169 Times in 116 Posts
Send a message via MSN to heath_rox
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; 09-27-2008 at 02:21 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 09-27-2008, 04:12 AM
Green Apple
 
Join Date: Sep 2008
Device + Firmware: iPhone (first-gen) 8GB OS 3.0
Operating System: 15" MacBook Pro OSX 10.5.7
Posts: 91
Thanks: 6
Thanked 19 Times in 12 Posts

something like this?
Attached Files
File Type: zip clockdate.zip (1.8 KB, 13 views)
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to h.abdulhamid86 For This Useful Post:
heath_rox (09-27-2008)
  #3  
Old 09-27-2008, 05:04 AM
heath_rox's Avatar
Livin the iPhone Life
 
Join Date: Nov 2007
Device + Firmware: 1st Gen IPhone all sizes/unlocked 2.0
Operating System: OSX Leopard
Location: Liberty City
Posts: 1,289
Thanks: 117
Thanked 169 Times in 116 Posts
Send a message via MSN to heath_rox

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; 09-27-2008 at 06:05 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 09-27-2008, 08:23 AM
Bear Hunter's Avatar
iPhone? More like MyPhone
 
Join Date: Sep 2008
Device + Firmware: iPhone 2.1
Operating System: MBP, iMac, eMac
Posts: 279
Thanks: 17
Thanked 99 Times in 53 Posts

^^ I hope your a chic heath LOL

Anyway, how to you apply this theme?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5  
Old 09-27-2008, 09:30 AM
Green Apple
 
Join Date: Sep 2008
Device + Firmware: iPhone (first-gen) 8GB OS 3.0
Operating System: 15" MacBook Pro OSX 10.5.7
Posts: 91
Thanks: 6
Thanked 19 Times in 12 Posts

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
File Type: zip clockdate2.html.zip (1.6 KB, 12 views)
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 2 Users Say Thank You to h.abdulhamid86 For This Useful Post:
Bear Hunter (09-27-2008), heath_rox (09-27-2008)
  #6  
Old 09-27-2008, 09:40 AM
heath_rox's Avatar
Livin the iPhone Life
 
Join Date: Nov 2007
Device + Firmware: 1st Gen IPhone all sizes/unlocked 2.0
Operating System: OSX Leopard
Location: Liberty City
Posts: 1,289
Thanks: 117
Thanked 169 Times in 116 Posts
Send a message via MSN to heath_rox

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; 09-27-2008 at 09:40 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #7  
Old 09-27-2008, 11:47 AM
Bear Hunter's Avatar
iPhone? More like MyPhone
 
Join Date: Sep 2008
Device + Firmware: iPhone 2.1
Operating System: MBP, iMac, eMac
Posts: 279
Thanks: 17
Thanked 99 Times in 53 Posts

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; 09-27-2008 at 11:47 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #8  
Old 09-27-2008, 06:16 PM
Green Apple
 
Join Date: Sep 2008
Device + Firmware: iPhone (first-gen) 8GB OS 3.0
Operating System: 15" MacBook Pro OSX 10.5.7
Posts: 91
Thanks: 6
Thanked 19 Times in 12 Posts

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
File Type: zip Wallpaper.html.zip (1.7 KB, 13 views)
File Type: zip Wallpaper24.html.zip (1.5 KB, 7 views)
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 3 Users Say Thank You to h.abdulhamid86 For This Useful Post:
Bear Hunter (09-27-2008), heath_rox (09-27-2008), jabbawalkee (09-27-2008)
  #9  
Old 09-27-2008, 06:21 PM
Green Apple
 
Join Date: Sep 2008
Device + Firmware: iPhone (first-gen) 8GB OS 3.0
Operating System: 15" MacBook Pro OSX 10.5.7
Posts: 91
Thanks: 6
Thanked 19 Times in 12 Posts

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
File Type: zip Wallpaper.html 2.zip (1.7 KB, 12 views)
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to h.abdulhamid86 For This Useful Post:
heath_rox (09-27-2008)
  #10  
Old 09-27-2008, 08:01 PM
heath_rox's Avatar
Livin the iPhone Life
 
Join Date: Nov 2007
Device + Firmware: 1st Gen IPhone all sizes/unlocked 2.0
Operating System: OSX Leopard
Location: Liberty City
Posts: 1,289
Thanks: 117
Thanked 169 Times in 116 Posts
Send a message via MSN to heath_rox

thanks sooo much again
edit: it makes the background black any way i can make it show my wallpaper

Last edited by heath_rox; 09-27-2008 at 08:03 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #11  
Old 09-27-2008, 10:47 PM
Bear Hunter's Avatar
iPhone? More like MyPhone
 
Join Date: Sep 2008
Device + Firmware: iPhone 2.1
Operating System: MBP, iMac, eMac
Posts: 279
Thanks: 17
Thanked 99 Times in 53 Posts

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!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > Design and Media For the iPhone / iPod Touch > Skinning / Themes Discussion

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 07:29 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top