< >

Bilder-ordner-anzeigen-als-thumbnails.php


Quell Code


<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="http://stylehatch.github.io/photoset-grid/css/main1.css" />
      <link rel="stylesheet" href="http://stylehatch.github.io/photoset-grid/css/colorbox.css" />

    <link rel="stylesheet" type="text/css" href="http://nitinhayaran.github.io/Justified.js/jquery.justified.css">
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>

</head>
<div class="photoset-grid-lightbox" data-layout="555555" style="visibility: hidden;">
    <?php
    
    error_reporting(E_ALL); 
ini_set('display_errors', true);

    
    
    $link='';
        $ordner = "../bilder/";
        $allebilder = scandir($ordner);
        foreach ($allebilder as $bild) {
            $bildinfo = pathinfo($ordner."/".$bild); 
            $size = ceil(filesize($ordner."/".$bild)/1024); 
            if ($bild != "." && $bild != ".."  && $bild != "_notes" && $bildinfo['basename'] != "Thumbs.db") {
   
               $link.='<img height="200" width="200" src="'.$bildinfo['dirname'].'/'.$bildinfo['basename'].'" data-highres="'.$bildinfo['dirname'].'/'.$bildinfo['basename'].'">';
   
            };
        };
echo $link;
    ?>
</div>

  <script src="http://stylehatch.github.io/photoset-grid/jquery.photoset-grid.js"></script>
  <script src="http://stylehatch.github.io/photoset-grid/js/jquery.colorbox.js"></script>
 
<script>
  $('.photoset-grid-lightbox').photosetGrid({
    highresLinks: true,
    rel: 'withhearts-gallery',
    gutter: '12px',
    width:'800px',

    onComplete: function(){
      $('.photoset-grid-lightbox').attr('style', '');
      $('.photoset-grid-lightbox a').colorbox({
        photo: true,
        scalePhotos: true,
                maxHeight:'90%',
                maxWidth:'90%'
      });
    }
  });
</script>


Add Comment

* Required information
1000
Powered by Commentics

Comments (1)

Gravatar
Admin
Sascha65says...

Die Canvas Balken Uhr ist ja mal Fett