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 > iPhone Modding > General iPhone Chat
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 10-15-2008, 05:11 PM
What's Jailbreak?
 
Join Date: Jul 2008
Posts: 24
Thanks: 8
Thanked 1 Time in 1 Post
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>
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 10-17-2008, 01:11 PM
What's Jailbreak?
 
Join Date: Jul 2008
Posts: 24
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! :-)
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 > iPhone Modding > General iPhone Chat

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:53 PM. 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 / / Top