DjTaz |
07-18-2007 12:04 AM |
I have just made a small change to the options here if anyone wants to try it out ....
I use this in the members profile to list their photos , but it could be used on the main page as well
in the template edit, instead of
use this instead :
Code:
<!!!!!!! added in !!!!!!!!!!!!!>
<if condition="$gallphotos>6">
<!-- Scroller Javascripts -->
<SCRIPT language=JavaScript type=text/javascript>
var richtung=1;
var scroll_step=15;
var scroll_timeout=30;
var scroll_max=0;
function dummy() {}
function scroll(trichtung,tscroll_max) {
richtung=trichtung;
scroll_max=tscroll_max;
scrolllauf(richtung,scroll_max);
if (richtung != 3) {
setTimeout('scroll(richtung,scroll_max);',scroll_timeout)
}
}
function scrolllauf(trichtung,tscroll_max) {
if (document.layers) {
inhaltObj=document.layers["l_fenster"].layers["l_gallerie"];
}
else {
inhaltObj=document.getElementById("gallerie").style;
}
position=parseInt(inhaltObj.left);
if (richtung==0) {
if (position<0) {
inhaltObj.left=Math.min(position+scroll_step,0);
}
}
if (richtung==1) {
if (position>-scroll_max) {
inhaltObj.left=Math.max(position-scroll_step,-scroll_max);
}
}
}
function stop() {
richtung=3;
}
//-->
</SCRIPT>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=140 >
<TBODY>
<TR>
<TD><A href="javascript:dummy()" onmouseout=stop()
onmouseover=scroll(0,2900)><IMG border=0 height=20 src="images/leftarrow.gif" width=20></A>
<IMG border=0 height=0 src="images/rightarrow.gif" width=0>
</TD>
<TD width=100% align=center>
<SCRIPT language=JavaScript type=text/javascript>
<!--
if (document.layers){document.write('<ILAYER id="l_fenster" width="100%" height="160" clip="0,0,600,140" & z-index="1"><LAYER id="l_gallerie" width="100%" height="140" z-index="1">')}
else {document.write('<DIV id=fenster style="HEIGHT: 140px; OVERFLOW: hidden; POSITION: relative; WIDTH: 700px"><DIV id=gallerie style="HEIGHT: 140px; LEFT: 0px; POSITION: absolute; WIDTH: 700px">')}
//-->
</SCRIPT>
</if>
$copphotos
<if condition="$gallphotos>6">
<SCRIPT language=JavaScript type=text/javascript>
<!--
if (document.layers){document.write('</LAYER></ILAYER>')}
else {document.write('</DIV></DIV>')}
//-->
</SCRIPT>
</TD>
<TD><A href="javascript:dummy()" onmouseout=stop()
onmouseover=scroll(1,1200)><IMG border=0 height=20 src="images/rightarrow.gif" width=20></A>
</TD>
</TR>
</TABLE>
</if>
<!!!!!!! end added in !!!!
and you get a scrolling image ... -- upload the 2 arrows to the images directory and away you go.
This doesnt work with firefox as i discovered - if anyone can get a working version in firefox please let me know .... example : http://www.theotherzone.com/Taz
|