+ Reply
Results 1 to 3 of 3

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


Thread: Why won't my lockscreen show the year?

is a discussion within the

Skinning / Themes Discussion

forums, a part of the

Design and Media For the iPhone / iPod Touch

section;
I have done everything and I don't know what I've missed. Can someone please sort it out for me. Code: <?xml version="1.0" encoding="UTF-16"?> <html> <head> <style> body{ background:url('wall.png'); background-size:320px 480px;
...
  1. #1
    iPhone? More like MyPhone
    Join Date
    Feb 2010
    Posts
    111
    Thanks
    7
    Thanked 4 Times in 4 Posts

    Default Why won't my lockscreen show the year?
    I have done everything and I don't know what I've missed. Can someone please sort it out for me.

    Code:
    <?xml version="1.0" encoding="UTF-16"?>
    
    <html>
    <head>
    <style>
    
    body{
        background:url('wall.png');
        background-size:320px 480px;
        background-repeat:no-repeat;
        font-family:Heiti TC;
        color:#ffffff;
    }
    
    
    SPAN#clock{
        position:absolute
        text-align:center;
        font-family:Heiti TC;
        color:rgba(255,255,255,1);
        -webkit-mask-box-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0)), to(rgba(0,0,0,0)), color-stop(0.6773,white));
        text-shadow:0px 2px 10px black;	
        font-size:50px;
    }
    
    
    SPAN#weekday {
    	font-family: Heiti TC;
    	font-weight: 600;
    	color: #ffffff;
    	font-size: 16px;
    }
    
    
    
    SPAN#year{
        font-family:Helvetica;
        text-align:center;
        color:#ffffff;
        text-shadow:0px -1px 0px rgba(0, 0, 0, 0.7);
        font-size:100px;
    
    }
    
    
    
    
    </style>
    
    
    
    
    
    
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <script language="JavaScript" type="text/javascript">
    
    function updateClock ( ){
        var currentTime = new Date ( );
        var currentHours = currentTime.getHours ( );
        var currentMinutes = currentTime.getMinutes ( );
        var currentSeconds = currentTime.getSeconds ( );
    
        currentHours = ( currentHours < 10 ? "0" : "" ) + currentHours;
        currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
        currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
    
        var timeOfDay = ( currentHours < 24 ) ? "AM" : "PM";
        currentHours = ( currentHours > 24 ) ? currentHours - 12 : currentHours;
        currentHours = ( currentHours == 0 ) ? 12 : currentHours;
    
        var currentTimeString = currentHours + ":" + currentMinutes;
    
        document.getElementById("clock").firstChild.nodeValue = currentTimeString;
    }
    
    
    
    
    function calendarDate ( ){
    	var this_date_name_array = new Array ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27" ,"28", "29" ,"30", "31")
    	var this_weekday_name_array = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
    	var this_month_name_array = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
    
      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;	   
    
    document.getElementById("weekday").firstChild.nodeValue = this_weekday_name_array[this_weekday]
    document.getElementById("date").firstChild.nodeValue = this_date_name_array[this_date]
    document.getElementById("month").firstChild.nodeValue = this_month_name_array[this_month]
    document.getElementById("year").firstChild.nodeValue = this_year_name_array[this_year]
    }
    
    
    
    
    
    </script>
    </head>
    
    
    
    
    
    
    
    
    <body>
    <div id="line"></div>		     
    <table style="position: absolute;top: 60px; left: 0px; width: 320px; height: 461px;align: center; opacity: 1.0; z-index: 14;">
    <tr align="center" valign="top" border="0" cellpadding="0">
        <td valign="top">
    	<span id="clock">
    	    <script language="JavaScript">updateClock(); setInterval('updateClock()', 1000 )</script></span>
        </td>
    </tr>
    </table>
    
    
    
    <table style="position: absolute; left: -120px; top: 154px; width: 320px; height: 480px; z-index: 20;">
    <tr align="center" valign="top"  border="0" cellpadding="0">
        <td height="12" valign="top" margin-left="20" >
    <span id="weekday">
    <script language="JavaScript">calendarDate(); setInterval('calendarDate()', 1000 )</script>
        </span>
        </td>
    </tr>
    <tr></table>
    
    
    
    <table style="position: absolute; top: 154px; left: -230px; width: 320px; height: 480px; z-index: 20;">
    <tr align="right" valign="top"  border="0" cellpadding="0">
        <td height="12" valign="top" margin-left="20" >
    <span id="date">
    <script language="JavaScript">calendarDate(); setInterval('calendarDate()', 1000 )</script>
        </span>
        </td>
    </tr>
    <tr></table>
    
    
    
    <table style="position: absolute; top: 154px; left: -38px; width: 320px; height: 480px; z-index: 20;">
    <tr align="center" valign="top"  border="0" cellpadding="0">
        <td height="12" valign="top" margin-left="20" >
    <span id="month">
    <script language="JavaScript">calendarDate(); setInterval('calendarDate()', 1000 )</script>
        </span>
        </td>
    </tr>
    <tr></table>
    
    
    
    
    <table style="position: absolute; top: 154px; left: -0px; width: 320px; height: 480px; z-index: 20;">
    <tr align="right" valign="top"  border="0" cellpadding="0">
        <td height="12" valign="top" margin-left="20" >
    	<span id="year">
    	    <script language="JavaScript">calendarDate(); setInterval('calendarDate()', 1000 )</script>
    	</span>
        </td>
    </tr>
    </table>
    
    </body>

  2. #2
    Super Duper Moderator blkcadi's Avatar
    Join Date
    Aug 2008
    Location
     Valley of the Sun, ARIZONA ♥♥♥
    Posts
    29,672
    Thanks
    3,448
    Thanked 9,175 Times in 5,679 Posts

    Are you using a tweak or widget?
    I'm not that good with code, just trying to get a handle on how your issue came about.

  3. #3
    iPhone? More like MyPhone
    Join Date
    Feb 2010
    Posts
    111
    Thanks
    7
    Thanked 4 Times in 4 Posts

    It's a lock screen widget. You copy the code onto notepad and save it as .html file and open it and it will then show you but I can't see the year.

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