< >

Image-Ordner-auslesen-und-mit-image-Slider-oeffnen.php


Quell Code


      <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>
<div class="photoset-grid-lightbox" data-layout="555555" style="visibility: hidden;">
    <?php
        $url =(isset($_SERVER['HTTPS'])?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];  
        error_reporting(E_ALL); 
        ini_set('display_errors', true);
        $x=0;
        $link='';
        $ordner = "../../bilder/";
        $allebilder = scandir($ordner);
        foreach ($allebilder as $bild) {
            $x++;
            $bildinfo = pathinfo($ordner."/".$bild); 
            $size = ceil(filesize($ordner."/".$bild)/1024); 
            if ($bild != "." && $bild != ".."  && $bild != "_notes" && $bildinfo['basename'] != "Thumbs.db") {
                  if($x<=18){
                       $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