PDA

View Full Version : Help with modifying the Saurik Theme...


mflantin
09-16-2008, 05:20 PM
Anyone out there familiar with HTML codes and played around with the Saurik Theme on Winterboard? The Saurik theme allows you to have a wallpaper that switches images every few seconds. I've figured out how to display the wallpapers I've chosen and have it switching every 8 seconds instead of 15, but for some reason, after all the wallpapers have cycled, it gets stuck cycling only two different wallpapers. Can anyone give me advice on how to change the HTML codes so that it cycles ALL of my wallpapers?

dsegel
09-17-2008, 04:20 PM
Try posting the section you changed and we can see what you've done.

You may want to look into the iHour theme as it may be easier to modify to get what you're after.

mflantin
09-17-2008, 04:28 PM
Try posting the section you changed and we can see what you've done.

You may want to look into the iHour theme as it may be easier to modify to get what you're after.


<script>
var images = ['Joker.png', 'Snowboard4.png', 'Boondock Saints.png', 'Blue Apple.png', 'Snowboard3.png', 'Bronze.png', 'Wallpaper.png', 'Widmer.png', 'Snowboard2.png'];
var index = 0;
var fade_in = one;
var fade_out = two;
fade_in.src = images[0];
fade_out.src = images[images.length - 1];
var fade = function () {
fade_in.src = images[index];
index = (index + 1) % images.length;
fade_in.className = 'fade-out';
fade_out.className = 'fade-in';
var fade_tmp = fade_in;
fade_in = fade_out;
fade_out = fade_tmp;
setTimeout(fade, 8000);
};
fade();
</script>


Does iHour allow the wallpaper to change every couple of seconds? I know it changes throughout the day, but I wasn't sure if you can set it to alternate every few seconds.

iToastBread
09-18-2008, 02:14 AM
here you go. i editted it to do up to 9 pictures.

<?xml version="1.0" encoding="UTF-16"?>
<html><head>
<base href="Private/"/>
<!--meta name="viewport" content="width=320, minimum-scale=1.0, maximum-scale=1.0"/-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

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

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

img.fade-out {
opacity: 0;
}

img.fade-in {
opacity: 1;
}
</style>
</head><body style="color: black">
<img id="one"/>
<img id="two"/>

<script>
var images = ['Plant.png', '1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png',
'8.png', '9.png'];
var index = 0;

var fade_in = one;
var fade_out = two;

fade_in.src = images[0];
fade_out.src = images[images.length - 1];

var fade = function () {
fade_in.src = images[index];
index = (index + 1) % images.length;

fade_in.className = 'fade-out';
fade_out.className = 'fade-in';

var fade_tmp = fade_in;
fade_in = fade_out;
fade_out = fade_tmp;

setTimeout(fade, 15000);
};

fade();
</script>
</body></html>

Make sure the pictures that u use are are "1.png" if not, change it to 1.png ,2.png , 3.png before you put the files into the device using Disk Aid or SSH

mflantin
09-18-2008, 02:18 PM
here you go. i editted it to do up to 9 pictures.

<?xml version="1.0" encoding="UTF-16"?>
<html><head>
<base href="Private/"/>
<!--meta name="viewport" content="width=320, minimum-scale=1.0, maximum-scale=1.0"/-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

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

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

img.fade-out {
opacity: 0;
}

img.fade-in {
opacity: 1;
}
</style>
</head><body style="color: black">
<img id="one"/>
<img id="two"/>

<script>
var images = ['Plant.png', '1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png',
'8.png', '9.png'];
var index = 0;

var fade_in = one;
var fade_out = two;

fade_in.src = images[0];
fade_out.src = images[images.length - 1];

var fade = function () {
fade_in.src = images[index];
index = (index + 1) % images.length;

fade_in.className = 'fade-out';
fade_out.className = 'fade-in';

var fade_tmp = fade_in;
fade_in = fade_out;
fade_out = fade_tmp;

setTimeout(fade, 15000);
};

fade();
</script>
</body></html>

Make sure the pictures that u use are are "1.png" if not, change it to 1.png ,2.png , 3.png before you put the files into the device using Disk Aid or SSH


I've done this already and it does cycle all nine pictures, but for some reason after it comletely cycles all the pictures, it get stuck cycling only two of the pictures. I'm trying to figure out how to configure it so it always cycles all nine pictures instead of getting stuck with two.

iToastBread
09-18-2008, 08:24 PM
I've done this already and it does cycle all nine pictures, but for some reason after it comletely cycles all the pictures, it get stuck cycling only two of the pictures. I'm trying to figure out how to configure it so it always cycles all nine pictures instead of getting stuck with two.
I think you messed up something up in your saurik file because with that code it should keep on cycling the 9 cycles because that is telling what the theme should do.

cooljo555
12-19-2008, 12:29 PM
THANKYOU very much for this, a have over 150 images now cycling and this was all i needed, the iHome theme doesnt cut it with picture for each preset time. Granted its not the wallpaper changing like rwallpaper does, but it just as good if not better because it actually changes with the time interval. If anyone figures out how to get rwallpaper on a jailbroke 2.2 it would be much appreciated.