Hallo ich hoffe Ihr könnt mir helfen ich habe hier ein Script das eine Slidershow beinhaltet. leider öffnet sich wenn man auf ein Bild Klickt das ganze in einer Seite es soll sich aber als popup öffnen.
Weiß leider nicht wie ich das wo ändern kann der Macher wusste es auch nicht (komisch)
Der Aufruf erfolgt darüber:
PHP-Code:
<iframe src="eddi_slidehorizon.php" name=slideshow" width="160px" marginwidth="0" height="90px" marginheight="0" scrolling="no" frameborder="0" ></iframe>
Ich Poste einfach mal den Code und hoffe auf eure Hilfe.Ich kenn mich leider mit java gar nicht aus wenn ich wüsste wie es geht bräuchte ich ja keine Hilfe
PHP-Code:
<?php
if ( !defined( 'SMARTY_DIR' ) ) {
include_once( 'init.php' );
}
?>
<script type="text/javascript">
<?php
$width = 957;
$height = 160;
$speed = 1;
$direction = left;
$bvalue = 0;
$bcolor = '000000';
$gap = 1;
$anzahl_bilder = 10;
if ($direction == 'left'){echo 'var slidedirection="'.$direction.'"'."\n";
}
else {echo 'var slidedirection="right"'."\n";
}
echo 'var slidespeed='.$speed."\n";
echo 'var sliderwidth="'.$width."px".'"'."\n";
echo 'var sliderheight="'.$height."px".'"'."\n";
?>
slidebgcolor= <?php echo '"#'.$bcolor.'"'."\n" ?>
var leftrightslide=new Array()
<?php
$LastUsersOD=array();
//Lese Bilder ein
/* EDDI 09.04.2007 - Nur User mit aktiven Bild anzeigen Sortierung Letzter Login*/
$sqlLastUsers = "SELECT distinct(usr.id), usr.id, usr.username, floor((to_days(curdate())-to_days(birth_date))/365.25) as age FROM ! as usr, ! as snap WHERE usr.id = snap.userid and snap.active = 'Y' ORDER BY usr.regdate DESC ";
$LastUsersOD = $db->getAll( $sqlLastUsers, array( USER_TABLE, USER_SNAP_TABLE ) );
for($x=0;$x < $anzahl_bilder;$x++){
echo 'leftrightslide['."$x".']='."'".'<a href="showprofile.php?id='. $LastUsersOD[$x][id] .'" title=" '.$LastUsersOD[$x][username] .'" target="_blank"><img src="getsnap.php?id='. $LastUsersOD[$x][id] .'&width=80&height=90" border=0></a>'."'"."\n";
}
if ($gap == 1){
echo 'var imagegap=" "'."\n";
echo 'var slideshowgap=4'."\n";
}
else{
echo 'var imagegap=""'."\n";
echo 'var slideshowgap=0'."\n";
}
?>
var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide
function fillup(){
if (iedom){
cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
cross_slide2.style.left=((actualwidth+slideshowgap)*(-1))+"px"
if (slidedirection === "left")
cross_slide2.style.left=(actualwidth+slideshowgap)+"px";
}
if (slidedirection === "left"){
lefttime=setInterval("slideleft()",40)
}
else{
lefttime=setInterval("slideright()",40);
}
}
window.onload=fillup
function slideleft(){
if (iedom){
if (parseInt(cross_slide.style.left)>(actualwidth*(-1)))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
else
cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"
if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
else
cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"
}
}
function slideright(){
if (iedom){
if (parseInt(cross_slide.style.left)<actualwidth)
cross_slide.style.left=parseInt(cross_slide.style.left)+copyspeed+"px"
else
cross_slide.style.left=parseInt(cross_slide2.style.left)-(actualwidth+slideshowgap+"px")
if (parseInt(cross_slide2.style.left)<actualwidth)
cross_slide2.style.left=parseInt(cross_slide2.style.left)+copyspeed+"px"
else
cross_slide2.style.left=parseInt(cross_slide.style.left)-(actualwidth+slideshowgap+"px")
}
}
if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="text-align: center; position: relative; border: 0;margin: 0;padding: <?php echo($bvalue/2) ?>px;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+';overflow:hidden">')
write('<div style="border: 0px;margin: 0px;padding: 0px; position: relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="border: 0px;margin: 0px;padding: 0px; position: relative;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
write('</div></div></div>')
}
document.write('</td></table>')
}
}
</script>