<? header('Content-type: text/javascript');
//news
$data = join("", file("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("=<item>(.+)</item>=sU", $data, $items);
$new1=0;
$i = 1;
foreach ($items[$i] as $item) {
if($i<="15")
{
preg_match("=<title>(.+)</title>=U", $item, $title);
preg_match("=<link>(.+)</link>=U", $item, $link);
$title[1] = str_replace("'","\'",$title[1]);
//$title[1] = preg_replace("'","\'",$title[1]);
$news[$i] = "<a href=\"$link[1]\">$title[1]</a>";
$new1=1;
$i++;
}
}
//news
$i = 0;
?>
/* * * * * * * * * * * * * * D I E V A R I A B L E N * * * * * * * * * * * * * * * * * */
tNews=new Array();
int tI;
//°°°°°°°°°°Die News
//for(tI = 0;tI < 15;tI++){
tNews[0]='<? echo $news[$i++]; ?>';
tNews[1]='<? echo $news[$i++]; ?>';
tNews[2]='<? echo $news[$i++]; ?>';
tNews[3]='<? echo $news[$i++]; ?>';
tNews[4]='<? echo $news[$i++]; ?>';
tNews[5]='<? echo $news[$i++]; ?>';
tNews[6]='<? echo $news[$i++]; ?>';
tNews[7]='<? echo $news[$i++]; ?>';
tNews[8]='<? echo $news[$i++]; ?>';
tNews[9]='<? echo $news[$i++]; ?>';
tNews[10]='<? echo $news[$i++]; ?>';
tNews[11]='<? echo $news[$i++]; ?>';
tNews[12]='<? echo $news[$i++]; ?>';
tNews[13]='<? echo $news[$i++]; ?>';
tNews[14]='<? echo $news[$i++]; ?>';
//}
//°°°°°°°°°°Delimiter zwischen den einzelnen News
tDelimiter =' + + + ';
//°°°°°°°°°°Interval in ms
tInterval =10;
//°°°°°°°°°°Stop bei mouseover?true:false
tStop =true;
//°°°°°°°°°°Falls Leeraum zwischen News...hier Wert erhoehen...minimum:1
tRepeat =2;
//°°°°°°°°°°Rahmen
tBorder ='0px solid #818181';
//°°°°°°°°°°Breite
tWidth =300;
//Abstand Rahmen->Inhalt (top+bottom)
tPadding =1;
//Das Aussehen per CSS anpassbar unter Verwendung des Selectors #ticker
/* * * * * * * * * * * * * * * * D E R T I C K E R * * * * * * * * * * * * * * * * * */
IE=document.all&&!window.opera;DOM=document.getElementById&&!IE;
if(DOM||IE)
{
var tGo;tPos=0;tStop=tStop?'onmouseover="clearInterval(tGo)"'+
'onmouseout="tGo=setInterval(\'DM_ticken()\','+tInterval+')"':'';
tTxt=tDelimiter+tNews.join(tDelimiter);tNews=tTxt;
for(i=1;i<tRepeat;++i){tNews+=tTxt;}document.write
('<div style="overflow:hidden;border:'+tBorder+';width:'+
tWidth+'px;padding:'+tPadding+'px 0px '+tPadding+'px 0px;">'+
'<nobr><span id="ticker"style="position:relative;"'+tStop+'>'+
tNews+'</span></nobr></div>');
tObj=IE?document.all.ticker:document.getElementById('ticker');
function DM_ticken(){tOffset=tObj.offsetWidth/tRepeat;
if(Math.abs(tPos)>tOffset){tPos=0;}tObj.style.left=tPos;tPos--;}
tGo=setInterval('DM_ticken()',tInterval);
}