Nieuw lid |
|
Goedemiddag,
Op mijn privewebsite heb ik in het verleden het volgende script gebruikt:
<HTML>
<HEAD>
<TITLE></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style/frame.css" rel="stylesheet" type="text/css">
<SCRIPT type="text/javascript" src="style/slideshow.js"></SCRIPT>
<SCRIPT type="text/javascript">
SLIDES = new slideshow("SLIDES");
<?php
include('include/connect.php');
if (!empty($_GET['c']))
{
$aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()";
}
else
{
$aSql = "SELECT * FROM fotos ORDER BY rand()";
}
$aQuery = mysql_query($aSql);
while ($aShow = mysql_fetch_assoc($aQuery))
{
if (!isset($eerste))
$eerste = $aShow['naam'];
?>
SLIDES.add_slide(s = new slide('uploads/thumbs/<?=$aShow['naam']?>'));
s.filter = 'progid:DXImageTransform.Microsoft.Fade()';
<?php
}
?>
</SCRIPT>
</HEAD>
<BODY onLoad="SLIDES.play();" style="margin: 0px;">
<div align="center"><IMG name="SLIDESIMG" src="uploads/thumbs/<?=$eerste?>" border="1" onmouseover="SLIDES.pause();" onmouseout="SLIDES.next();SLIDES.play();" style="filter:progid:DXImageTransform.Microsoft.Fade()"></div>
<SCRIPT type="text/javascript">
<!--
if (document.images) {
SLIDES.image = document.images.SLIDESIMG;
// Create a function to ramp up the image opacity in Mozilla
var fadein_opacity = 0;
var fadein_img = SLIDES.image;
function fadein(opacity) {
if (typeof opacity != 'undefined') fadein_opacity = opacity;
if (fadein_opacity < 1 && fadein_img && fadein_img.style &&
typeof fadein_img.style.MozOpacity != 'undefined') {
fadein_opacity += .05;
fadein_img.style.MozOpacity = fadein_opacity;
setTimeout("fadein()", 100);
}
}
// Tell the slideshow to call our function whenever the slide is changed
SLIDES.post_update_hook = function() { fadein(0); }
}
//-->
</SCRIPT>
</BODY>
</HTML>
<HTML> <HEAD> <TITLE></TITLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="style/frame.css" rel="stylesheet" type="text/css"> <SCRIPT type="text/javascript" src="style/slideshow.js"></SCRIPT> <SCRIPT type="text/javascript"> SLIDES = new slideshow("SLIDES"); <?php include('include/connect.php'); { $aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()"; } else { $aSql = "SELECT * FROM fotos ORDER BY rand()"; } { $eerste = $aShow['naam']; ?> SLIDES.add_slide(s = new slide('uploads/thumbs/<?=$aShow['naam']?>')); s.filter = 'progid:DXImageTransform.Microsoft.Fade()'; <?php } ?> </SCRIPT> </HEAD> <BODY onLoad="SLIDES.play();" style="margin: 0px;"> <div align="center"><IMG name="SLIDESIMG" src="uploads/thumbs/<?=$eerste?>" border="1" onmouseover="SLIDES.pause();" onmouseout="SLIDES.next();SLIDES.play();" style="filter:progid:DXImageTransform.Microsoft.Fade()"></div> <SCRIPT type="text/javascript"> <!-- if (document.images) { SLIDES.image = document.images.SLIDESIMG; // Create a function to ramp up the image opacity in Mozilla var fadein_opacity = 0; var fadein_img = SLIDES.image; function fadein(opacity) { if (typeof opacity != 'undefined') fadein_opacity = opacity; if (fadein_opacity < 1 && fadein_img && fadein_img.style && typeof fadein_img.style.MozOpacity != 'undefined') { fadein_opacity += .05; fadein_img.style.MozOpacity = fadein_opacity; setTimeout("fadein()", 100); } } // Tell the slideshow to call our function whenever the slide is changed SLIDES.post_update_hook = function() { fadein(0); } } //--> </SCRIPT> </BODY> </HTML>
Nu wil ik eigenlijk dat de foto die voorbij komt aanklikbaar wordt met de link die bij de foto hoort
Ik heb het nu een aantal keer geprobeerd bij de volgende optie gaat het goed alleen laat het script 1 foto zien en vervolgens houdt hij er dan mee op:
<HTML>
<HEAD>
<TITLE></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style/frame.css" rel="stylesheet" type="text/css">
<SCRIPT type="text/javascript" src="style/slideshow.js"></SCRIPT>
<SCRIPT type="text/javascript">
SLIDES = new slideshow("SLIDES");
<?php
include('include/connect.php');
if (!empty($_GET['c']))
{
$aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()";
}
else
{
$aSql = "SELECT * FROM fotos ORDER BY rand()";
$bSql = "SELECT * FROM namen ORDER BY naam";
}
$aQuery = mysql_query($aSql);
$bQuery = mysql_query($bSql);
while ($aShow = mysql_fetch_assoc($aQuery))
{
if (!isset($eerste))
$eerste = $aShow['naam'];
}
while ($bShow = mysql_fetch_assoc($bQuery))
{
if (!isset($tweede))
$tweede = $bShow['link'];
?>
SLIDES.add_slide(s = new slide('uploads/thumbs/<?=$aShow['naam']?>'));
s.filter = 'progid:DXImageTransform.Microsoft.Fade()';
<?php
}
?>
</SCRIPT>
</HEAD>
<BODY onLoad="SLIDES.play();" style="margin: 0px;">
<div align="center"><a href="<?=$tweede?>" target="_blank"><IMG name="SLIDESIMG" src="uploads/thumbs/<?=$eerste?>" border="1" onmouseover="SLIDES.pause();" onmouseout="SLIDES.next();SLIDES.play();" style="filter:progid:DXImageTransform.Microsoft.Fade()"></a></div>
<SCRIPT type="text/javascript">
<!--
if (document.images) {
SLIDES.image = document.images.SLIDESIMG;
// Create a function to ramp up the image opacity in Mozilla
var fadein_opacity = 0;
var fadein_img = SLIDES.image;
function fadein(opacity) {
if (typeof opacity != 'undefined') fadein_opacity = opacity;
if (fadein_opacity < 1 && fadein_img && fadein_img.style &&
typeof fadein_img.style.MozOpacity != 'undefined') {
fadein_opacity += .05;
fadein_img.style.MozOpacity = fadein_opacity;
setTimeout("fadein()", 100);
}
}
// Tell the slideshow to call our function whenever the slide is changed
SLIDES.post_update_hook = function() { fadein(0); }
}
//-->
</SCRIPT>
</BODY>
</HTML>
<HTML> <HEAD> <TITLE></TITLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="style/frame.css" rel="stylesheet" type="text/css"> <SCRIPT type="text/javascript" src="style/slideshow.js"></SCRIPT> <SCRIPT type="text/javascript"> SLIDES = new slideshow("SLIDES"); <?php include('include/connect.php'); { $aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()"; } else { $aSql = "SELECT * FROM fotos ORDER BY rand()"; $bSql = "SELECT * FROM namen ORDER BY naam"; } { $eerste = $aShow['naam']; } { $tweede = $bShow['link']; ?> SLIDES.add_slide(s = new slide('uploads/thumbs/<?=$aShow['naam']?>')); s.filter = 'progid:DXImageTransform.Microsoft.Fade()'; <?php } ?> </SCRIPT> </HEAD> <BODY onLoad="SLIDES.play();" style="margin: 0px;"> <div align="center"><a href="<?=$tweede?>" target="_blank"><IMG name="SLIDESIMG" src="uploads/thumbs/<?=$eerste?>" border="1" onmouseover="SLIDES.pause();" onmouseout="SLIDES.next();SLIDES.play();" style="filter:progid:DXImageTransform.Microsoft.Fade()"></a></div> <SCRIPT type="text/javascript"> <!-- if (document.images) { SLIDES.image = document.images.SLIDESIMG; // Create a function to ramp up the image opacity in Mozilla var fadein_opacity = 0; var fadein_img = SLIDES.image; function fadein(opacity) { if (typeof opacity != 'undefined') fadein_opacity = opacity; if (fadein_opacity < 1 && fadein_img && fadein_img.style && typeof fadein_img.style.MozOpacity != 'undefined') { fadein_opacity += .05; fadein_img.style.MozOpacity = fadein_opacity; setTimeout("fadein()", 100); } } // Tell the slideshow to call our function whenever the slide is changed SLIDES.post_update_hook = function() { fadein(0); } } //--> </SCRIPT> </BODY> </HTML>
Heb het opgelost!
<?php
include('include/connect.php');
if (!empty($_GET['c']))
{
$aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()";
}
else
{
$aSql = "SELECT * FROM fotos ORDER BY rand()";
}
$aQuery = mysql_query($aSql);
while ($aShow = mysql_fetch_assoc($aQuery))
{
if (!isset($eerste))
$eerste = $aShow['naam'];
$bSql = "SELECT * FROM namen ORDER BY naam";
$bQuery = mysql_query($bSql);
$bShow = mysql_fetch_assoc($bQuery);
?>
<?php include('include/connect.php'); { $aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()"; } else { $aSql = "SELECT * FROM fotos ORDER BY rand()"; } { $eerste = $aShow['naam']; $bSql = "SELECT * FROM namen ORDER BY naam"; ?>
<div align="center"><a href="<?=$bShow['link']?>" target="_blank"><IMG name="SLIDESIMG" src="uploads/thumbs/<?=$eerste?>" border="1" onmouseover="SLIDES.pause();" onmouseout="SLIDES.next();SLIDES.play();" style="filter:progid:DXImageTransform.Microsoft.Fade()"></a></div>
<div align="center"><a href="<?=$bShow['link']?>" target="_blank"> <IMG name="SLIDESIMG" src="uploads/thumbs/<?=$eerste?>" border="1" onmouseover="SLIDES.pause();" onmouseout="SLIDES.next();SLIDES.play();" style="filter:progid:DXImageTransform.Microsoft.Fade()"> </a></div>
|