login  Naam:   Wachtwoord: 
Registreer je!
 Forum

foto script (Opgelost)

Offline FCKeMo - 12/03/2011 13:49 (laatste wijziging 12/03/2011 14:31)
Avatar van FCKeMoNieuw lid Goedemiddag,

Op mijn privewebsite heb ik in het verleden het volgende script gebruikt:
  1. <HTML>
  2. <HEAD>
  3. <TITLE></TITLE>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <link href="style/frame.css" rel="stylesheet" type="text/css">
  6. <SCRIPT type="text/javascript" src="style/slideshow.js"></SCRIPT>
  7. <SCRIPT type="text/javascript">
  8. SLIDES = new slideshow("SLIDES");
  9.  
  10. <?php
  11. include('include/connect.php');
  12.  
  13. if (!empty($_GET['c']))
  14. {
  15. $aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()";
  16. }
  17. else
  18. {
  19. $aSql = "SELECT * FROM fotos ORDER BY rand()";
  20.  
  21. }
  22.  
  23. $aQuery = mysql_query($aSql);
  24.  
  25. while ($aShow = mysql_fetch_assoc($aQuery))
  26. {
  27. if (!isset($eerste))
  28. $eerste = $aShow['naam'];
  29.  
  30. ?>
  31.  
  32.  
  33. SLIDES.add_slide(s = new slide('uploads/thumbs/<?=$aShow['naam']?>'));
  34. s.filter = 'progid:DXImageTransform.Microsoft.Fade()';
  35. <?php
  36. }
  37. ?>
  38. </SCRIPT>
  39. </HEAD>
  40. <BODY onLoad="SLIDES.play();" style="margin: 0px;">
  41. <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>
  42. <SCRIPT type="text/javascript">
  43. <!--
  44.  
  45. if (document.images) {
  46.  
  47. SLIDES.image = document.images.SLIDESIMG;
  48.  
  49. // Create a function to ramp up the image opacity in Mozilla
  50. var fadein_opacity = 0;
  51. var fadein_img = SLIDES.image;
  52. function fadein(opacity) {
  53. if (typeof opacity != 'undefined') fadein_opacity = opacity;
  54. if (fadein_opacity < 1 && fadein_img && fadein_img.style &&
  55. typeof fadein_img.style.MozOpacity != 'undefined') {
  56.  
  57. fadein_opacity += .05;
  58. fadein_img.style.MozOpacity = fadein_opacity;
  59. setTimeout("fadein()", 100);
  60. }
  61. }
  62.  
  63. // Tell the slideshow to call our function whenever the slide is changed
  64. SLIDES.post_update_hook = function() { fadein(0); }
  65.  
  66. }
  67.  
  68. //-->
  69. </SCRIPT>
  70. </BODY>
  71. </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:

  1. <HTML>
  2. <HEAD>
  3. <TITLE></TITLE>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <link href="style/frame.css" rel="stylesheet" type="text/css">
  6. <SCRIPT type="text/javascript" src="style/slideshow.js"></SCRIPT>
  7. <SCRIPT type="text/javascript">
  8. SLIDES = new slideshow("SLIDES");
  9.  
  10. <?php
  11. include('include/connect.php');
  12.  
  13. if (!empty($_GET['c']))
  14. {
  15. $aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()";
  16. }
  17. else
  18. {
  19. $aSql = "SELECT * FROM fotos ORDER BY rand()";
  20. $bSql = "SELECT * FROM namen ORDER BY naam";
  21.  
  22. }
  23.  
  24. $aQuery = mysql_query($aSql);
  25. $bQuery = mysql_query($bSql);
  26.  
  27. while ($aShow = mysql_fetch_assoc($aQuery))
  28. {
  29. if (!isset($eerste))
  30. $eerste = $aShow['naam'];
  31. }
  32.  
  33. while ($bShow = mysql_fetch_assoc($bQuery))
  34. {
  35. if (!isset($tweede))
  36. $tweede = $bShow['link'];
  37. ?>
  38.  
  39. SLIDES.add_slide(s = new slide('uploads/thumbs/<?=$aShow['naam']?>'));
  40. s.filter = 'progid:DXImageTransform.Microsoft.Fade()';
  41. <?php
  42. }
  43. ?>
  44. </SCRIPT>
  45. </HEAD>
  46. <BODY onLoad="SLIDES.play();" style="margin: 0px;">
  47. <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>
  48. <SCRIPT type="text/javascript">
  49. <!--
  50.  
  51. if (document.images) {
  52.  
  53. SLIDES.image = document.images.SLIDESIMG;
  54.  
  55. // Create a function to ramp up the image opacity in Mozilla
  56. var fadein_opacity = 0;
  57. var fadein_img = SLIDES.image;
  58. function fadein(opacity) {
  59. if (typeof opacity != 'undefined') fadein_opacity = opacity;
  60. if (fadein_opacity < 1 && fadein_img && fadein_img.style &&
  61. typeof fadein_img.style.MozOpacity != 'undefined') {
  62.  
  63. fadein_opacity += .05;
  64. fadein_img.style.MozOpacity = fadein_opacity;
  65. setTimeout("fadein()", 100);
  66. }
  67. }
  68.  
  69. // Tell the slideshow to call our function whenever the slide is changed
  70. SLIDES.post_update_hook = function() { fadein(0); }
  71.  
  72. }
  73.  
  74. //-->
  75. </SCRIPT>
  76. </BODY>
  77. </HTML>




Heb het opgelost!

  1. <?php
  2. include('include/connect.php');
  3.  
  4. if (!empty($_GET['c']))
  5. {
  6. $aSql = "SELECT * FROM fotos WHERE categorie='".$_GET['c']."' ORDER BY rand()";
  7. }
  8. else
  9. {
  10. $aSql = "SELECT * FROM fotos ORDER BY rand()";
  11.  
  12. }
  13.  
  14. $aQuery = mysql_query($aSql);
  15.  
  16. while ($aShow = mysql_fetch_assoc($aQuery))
  17. {
  18. if (!isset($eerste))
  19. $eerste = $aShow['naam'];
  20.  
  21. $bSql = "SELECT * FROM namen ORDER BY naam";
  22. $bQuery = mysql_query($bSql);
  23. $bShow = mysql_fetch_assoc($bQuery);
  24.  
  25. ?>

  1. <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>

0 antwoorden

Gesponsorde links
Er zijn nog geen reacties op dit bericht.
Je moet ingelogd zijn om een reactie te kunnen posten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.202s