[TYPO3] levelmedia: -1

Bas van der Togt bas.vander.togt at efocus.nl
Fri Jun 29 15:22:35 CEST 2007


Thanks for your code Georg!
It's almost working how i want it.
The start photo is still static now because it's in TS. Any idea how to 
make this random too? Attached the JS files i use.

Example http://www.wolfsstyle.com/ (un: algebra pw: algebra)

This is my TS:

page.headerData.15 = TEXT
page.headerData.15.value (
   	<script src="fileadmin/templates/js/mootools.js" 
type="text/javascript"></script>
   	<script src="fileadmin/templates/js/slideshow.js" 
type="text/javascript"></script>
)

# Slideshow javascript
lib.slideshow = TEXT
lib.slideshow.data = levelmedia: -1, slide
lib.slideshow.wrap (
	<script type="text/javascript">
   	window.onload = function() {
     		var tempString = "|";
		var tmpArray = tempString.split(",");
   		var imgArray = new Array();
		var offset = Math.floor(Math.random() * tmpArray.length);
		for (var ii = 0; ii < tmpArray.length; ii++) {
			var kk = ii + offset;
			if (kk >= tmpArray.length) {
				kk -= tmpArray.length;
			}
			imgArray[ii] = tmpArray[kk];
		}
		myShow = new Slideshow('slideshowAlgebra', {hu: '/uploads/media/', 
images: imgArray});
   	}
   	</script>
)

# Include javacsipt in header
page.headerData.20 < lib.slideshow

# Start photo
obj.foto = IMAGE
obj.foto {
   	wrap = <div id="slideshowAlgebra" class="slideshow">|</div>
   	altText = ALGEBRA - Fire & Rescue Technology
   	titleText = ALGEBRA - Fire & Rescue Technology
   	file {
     		import.data = levelmedia: -1, slide
     		import = uploads/media/
     		import.listNum = 0
     		width = 960
   	}
}



Georg Rehfeld wrote:
> Hi Bas, all,
> 
> I forgot:
> 
> Georg Rehfeld wrote:
>>    myShow = new Slideshow(.....
> 
> If you, Bas, now also can/will reveal, what script you use for your
> slideshow (assuming, that it is open source) this thread would turn into
> something really useful for future archive readers (including me).
> 
> regards, Georg



More information about the TYPO3-english mailing list