Combining Wallpaper.html

Discussion in 'iOS Themes and Customization' started by xDMONEY814x, Jan 16, 2009.

  1. xDMONEY814x

    xDMONEY814x New Member

    Joined:
    Dec 30, 2008
    Messages:
    104
    Likes Received:
    0
    Device:
    iPod touch
    Okay so I have the clock wallpaper.html that displays the date and time at the top of the springboard. I would like to combine this one with the wallpaper.html that comes with uLeopard that rotates through different wallpapers. I have tried and tried to combine the two, but cannot firgure it out. I have attached both HTML documents in the form of rich text format if anyone knows how to do this and would be able to do it really quickly for me. Thanks in advance for anyone who can manage to do it.

    Attached Files:

  2. Gamma

    Gamma Active Member

    Joined:
    Apr 2, 2008
    Messages:
    1,964
    Likes Received:
    3
    Device:
    iPod touch
    Try this:
    <html>
    <head><title>newclock</title></head>
    <style>

    SPAN#clock
    {
    font-family: Helvetica;
    color: #ffffff;
    font-size: 30px;
    text-shadow: #000000 1px 2px 1px;
    }

    SPAN#ampm
    {
    font-family: Helvetica;
    color: #ffffff;
    font-size: 15px;
    text-shadow: #000000 1px 2px 1px;
    }

    TD#date
    {
    font-family: Helvetica;
    text-align: center;
    color: #ffffff;
    text-shadow: #000000 1px 2px 1px;
    }

    </style>
    <style>
    body {
    background-color: black;
    margin: 0;
    padding: 0 0 0 0;
    height: 442px;
    width: 320px;
    }

    img {
    -webkit-transition-property: opacity;
    -webkit-transition-duration: 1.5s;
    position: absolute;
    width: 320px;
    height: auto;
    }

    img.fade-out {
    opacity: 0;
    }

    img.fade-in {
    opacity: 1;
    }

    </style>


    <script type="text/javascript">
    <!--
    var this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
    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()

    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] + ", " + this_month_name_array[this_month] + " " + this_date //concat long date string

    // -->
    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;

    // Update the time display
    document.getElementById("clock").firstChild.nodeValue = currentTimeString;
    }

    function init2 ( )
    {
    timeDisplay = document.createTextNode ( "" );
    document.getElementById("ampm").appendChild ( timeDisplay );
    }

    function amPm ( )
    {
    var currentTime = new Date ( );

    var currentHours = currentTime.getHours ( );

    // 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 = timeOfDay;

    // Update the time display
    document.getElementById("ampm").firstChild.nodeValue = currentTimeString;
    }

    // -->
    </script>

    </head>


    <body>

    <body>

    <img src="Private/0.png" id="image0" class="fade-out" />
    <img src="Private/1.png" id="image1" class="fade-out"/>
    <img src="Private/2.png" id="image2" class="fade-out"/>
    <img src="Private/3.png" id="image3" class="fade-out"/>
    <img src="Private/4.png" id="image4" class="fade-out"/>
    <img src="Private/5.png" id="image5" class="fade-out"/>
    <img src="Private/6.png" id="image6" class="fade-out"/>
    <img src="Private/7.png" id="image7" class="fade-out"/>
    <img src="Private/8.png" id="image8" class="fade-out"/>
    <img src="Private/9.png" id="image9" class="fade-out"/>

    <script>

    var fade = function(lastid) {

    var rnd=Math.floor(Math.random()*10)

    function fout() {
    if(rnd){document.getElementById('image'+rnd).className = 'fade-out';}
    fade()
    }

    document.getElementById('image'+rnd).className = 'fade-in';
    setTimeout(fout, 20000);
    };

    fade();
    </script>



    <table style="position: absolute; top: 32px; left: 0px; width: 320px; height: 461px;" cellspacing="0" cellpadding="0" align="center">
    <tr align="center" valign="top" border="0" cellpadding="0">
    <td height="10" valign="top">
    <span id="clock">
    <script language="JavaScript">updateClock(); setInterval('updateClock()', 1000 )</script></span><span id="ampm">
    <script language="JavaScript">amPm(); setInterval('amPm()', 1000 )</script>
    </span>
    </td>

    </tr>
    <tr>
    <td id="date" valign="top">
    <script language="JavaScript">document.write(this_date_string)</script>
    </td>
    </tr>
    </table>

    </body>
    </html>
  3. xDMONEY814x

    xDMONEY814x New Member

    Joined:
    Dec 30, 2008
    Messages:
    104
    Likes Received:
    0
    Device:
    iPod touch
    Nope. Didn't work. Neither the clock shows up OR does the wallpaper rotate. I don't know if there is something else I should be doing.
  4. Gamma

    Gamma Active Member

    Joined:
    Apr 2, 2008
    Messages:
    1,964
    Likes Received:
    3
    Device:
    iPod touch
    Hmm... I'm stumped...
    Maybe there's a way to open the clock html with the wallpaper one?
  5. xDMONEY814x

    xDMONEY814x New Member

    Joined:
    Dec 30, 2008
    Messages:
    104
    Likes Received:
    0
    Device:
    iPod touch
    I'm not sure. I'll wait to see if we can get more minds on this or not. I'll try to fidget with it later. So if anyone can figure this out, let me know. Thanks again. And thank you hacked2times for your help as well.
  6. Gitykins

    Gitykins Banned

    Joined:
    May 16, 2008
    Messages:
    3,760
    Likes Received:
    1
    Are you kidding? Name them both Widget.html
  7. Gamma

    Gamma Active Member

    Joined:
    Apr 2, 2008
    Messages:
    1,964
    Likes Received:
    3
    Device:
    iPod touch
    Really? Wow... I'm a n00b...

    Please Register or Log in to view images

  8. xDMONEY814x

    xDMONEY814x New Member

    Joined:
    Dec 30, 2008
    Messages:
    104
    Likes Received:
    0
    Device:
    iPod touch
    Is that seriously all I have to do? I feel retarded. I figured you'd be the one to come in and solve it. Thanks a lot man.

    EDIT: Where would I put them because I can't have two of the same named files.
  9. Gitykins

    Gitykins Banned

    Joined:
    May 16, 2008
    Messages:
    3,760
    Likes Received:
    1
    Make another folder, and put one of the widgets and it's called subfiles into that folder.
  10. xDMONEY814x

    xDMONEY814x New Member

    Joined:
    Dec 30, 2008
    Messages:
    104
    Likes Received:
    0
    Device:
    iPod touch
    Do I create said folders in the root of the theme?

Share This Page