+ Reply
Results 1 to 2 of 2
  1. #1
    What's Jailbreak?
    Join Date
    Jul 2008
    Posts
    25
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default I need programming help!!! Plz!

    so i am trying to make my own theme in winterboard similar to iHour, however I am a programming novice. I basically just took the code from iHour and modified it to change every 30 min instead of every hour. However something screws up in the code and I only get a black screen. If I change the wallpaper file back to normal it displays the images correctly, so I know that it is just an issue with making the prog read minutes instead of hours. i highlighted where I think the prob is.

    plz help!!! thanks! code posted below. only posted a portion of it so it wouldnt be so long, you get the idea. I have 48 images I wanted to coordinate with times of day. so i guess its more like TIME OF DAY than IHOUR.



    <html>
    <head>


    <title>Wallpaper</title>



    <script>


    var popunder=""


    var once_per_session=0


    function get_cookie(Name) {
    var search = Name + "="
    var returnvalue = "";
    if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
    offset += search.length
    // set index of beginning of value
    end = document.cookie.indexOf(";", offset);
    // set index of end of cookie value
    if (end == -1)
    end = document.cookie.length;
    returnvalue=unescape(document.cookie.substring(off set, end))
    }
    }
    return returnvalue;
    }

    function loadornot(){
    if (get_cookie('popunder')==''){
    loadpopunder()
    document.cookie="popunder=yes"
    }
    }

    function loadpopunder(){

    }

    if (once_per_session==0)
    loadpopunder()
    else
    loadornot()

    </script>

    </head>
    <body onLoad=window.setTimeout("location.href='Wallpaper .html'",30000)>


    <script language="JavaScript">



    day=new Date() //..get the date

    x=day.getHours() //..get the hour


    if(x>=0 && x<0.5) {

    document.write('<body background="./wallpapers/1.jpg">')

    } else

    if(x>=0.5 && x<1) {

    document.write('<body background="./wallpapers/2.jpg">')

    } else

    if(x>=1 && x<1.5) {

    document.write('<body background="./wallpapers/3.jpg">')

    } else

    if(x>=1.5 && x<2) {

    document.write('<body background="./wallpapers/4.jpg">')

    } else

    if (x>=2 && x<2.5) {

    document.write('<body background="./wallpapers/5.jpg">')

    } else

    if(x>=2.5 && x<3) {

    document.write('<body background="./wallpapers/6.jpg">')

    } else

    if (x>=3 && x<3.5) {

    document.write('<body background="./wallpapers/7.jpg">')

    } else

    if(x>=3.5 && x<4) {

    document.write('<body background="./wallpapers/8.jpg">')

    } else

    if (x>=4 && x<4.5) {

    document.write('<body background="./wallpapers/9.jpg">')

    } else

    if(x>=4.5 && x<5) {

    document.write('<body background="./wallpapers/10.jpg">')

    } else

    if (x>=5 && x<5.5) {

    document.write('<body background="./wallpapers/11.jpg">')

    } else

    if(x>=5.5 && x<6) {

    document.write('<body background="./wallpapers/12.jpg">')

    } else

    if (x>=6 && x<6.5) {

    document.write('<body background="./wallpapers/13.jpg">')

    } else

    if(x>=6.5 && x<7) {

    document.write('<body background="./wallpapers/14.jpg">')

    } else

    if (x>=7 && x<7.5) {

    document.write('<body background="./wallpapers/15.jpg">')

    } else

    if(x>=7.5 && x<8) {

    document.write('<body background="./wallpapers/16.jpg">')

    } else

    if (x>=8 && x<8.5) {

    document.write('<body background="./wallpapers/17.jpg">')

    } else

    if (x>=8.5 && x<9) {

    document.write('<body background="./wallpapers/18.jpg">')

    } else


    ETC ETC

    </html>

  2. #2
    What's Jailbreak?
    Join Date
    Jul 2008
    Posts
    25
    Thanks
    8
    Thanked 1 Time in 1 Post
    someone plz help. if you can just tell me how to change the highlighted part from the get hours to get minutes i can do the rest. I just dont know how to use the programming language to get it to recongnize minutes instead of hours.

    PLZ HELP! Ill DONATE, SERIOUSLY! :-)

Posting Permissions

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