Sie sind hier : sebastian1012.bplaced.net/ homepage-neu / Kurze-Scripte-und-Codeschnipsel / index.php

Zurück


Der Quellcode dazu


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<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>