PHP Classes

SPL Find Images: Get images for a gallery using SPL find iterators

Recommend this page to a friend!
  Info   View files Example   View files View files (37)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-06-15 (Yesterday) RSS 2.0 feedNot enough user ratingsTotal: 108 All time: 9,660 This week: 89Up
Version License PHP version Categories
spl-find-images 1.0GNU General Publi...5PHP 5, Files and Folders
Description 

Author

This package can get images for a gallery using SPL find iterators.

It can search for image files with a given extension in a given search directory.

The class returns an array with the list for found images including the path of the full size images and thumbnails.

Picture of Ravi Kumar
  Performance   Level  
Name: Ravi Kumar <contact>
Classes: 6 packages by
Country: India India
Innovation award
Innovation award
Nominee: 2x

Example

<?php
   
include_once 'Gallery.php';

   
$gallery = new Gallery();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>CSS3 Gallery & Lightbox</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="assets/css/demo.css">
    <link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
   
    <div class="container">
        <header>
            <h1>CSS3 <span>Gallery & Lightbox</span></h1>
            <h2>A simple CSS-only Gallery & lightbox</h2>
        </header>

        <section>
            <ul class="lb-album">

            <?php
               
foreach($gallery->getImages() as $index => $image) {
                   
$id = "image-$index";
                   
$href = "#$id";
                   
$full = $image['full'];
                   
$thumb = $image['thumb'];

           
?>

                <li>
                    <a href="<?php echo $href;?>">
                        <img src="<?php echo $thumb;?>" alt="<?php echo $id;?>">
                       
                    </a>
                    <div class="lb-overlay" id="<?php echo $id;?>">
                        <img src="<?php echo $full;?>" alt="<?php echo $id;?>" />
                       
                        <a href="#page" class="lb-close">x Close</a>
                    </div>
                </li>
           
            <?php
               
}
           
?>

            </ul>
        </section>
    </div>
</body>
</html>


  Files folder image Files  
File Role Description
Files folder imageassets (2 directories)
Files folder imageclasses (1 directory)
Files folder imageuploads (2 directories)
Plain text file Gallery.php Class Gallery class file
Accessible without login Plain text file index.php Example Demo file

  Files folder image Files  /  assets  
File Role Description
Files folder imagecss (2 files)
Files folder imagefonts (5 files)

  Files folder image Files  /  assets  /  css  
File Role Description
  Accessible without login Plain text file demo.css Data Auxiliary data
  Accessible without login Plain text file style.css Data Auxiliary data

  Files folder image Files  /  assets  /  fonts  
File Role Description
  Accessible without login Plain text file BebasNeue-webfont.eot Data Auxiliary data
  Accessible without login Plain text file BebasNeue-webfont.svg Data Auxiliary data
  Accessible without login Plain text file BebasNeue-webfont.ttf Data Auxiliary data
  Accessible without login Plain text file BebasNeue-webfont.woff Data Auxiliary data
  Accessible without login Plain text file Dharma Type Font License.txt Doc. Documentation

  Files folder image Files  /  classes  
File Role Description
Files folder imageFind (3 files, 1 directory)

  Files folder image Files  /  classes  /  Find  
File Role Description
Files folder imageIterators (2 files)
  Plain text file Find.php Class Class source
  Accessible without login Plain text file index.php Example Example script
  Accessible without login Plain text file README.md Data Auxiliary data

  Files folder image Files  /  classes  /  Find  /  Iterators  
File Role Description
  Plain text file ExtensionIterator.php Class Class source
  Plain text file SortingIterator.php Class Class source

  Files folder image Files  /  uploads  
File Role Description
Files folder imagefull (12 files)
Files folder imagethumbs (11 files)

  Files folder image Files  /  uploads  /  full  
File Role Description
  Accessible without login Image file 1.jpg Data Auxiliary data
  Accessible without login Image file 10.jpg Data Auxiliary data
  Accessible without login Image file 11.jpg Data Auxiliary data
  Accessible without login Image file 2.jpg Data Auxiliary data
  Accessible without login Image file 3.jpg Data Auxiliary data
  Accessible without login Image file 4.jpg Data Auxiliary data
  Accessible without login Image file 5.jpg Data Auxiliary data
  Accessible without login Image file 6.jpg Data Auxiliary data
  Accessible without login Image file 7.jpg Data Auxiliary data
  Accessible without login Image file 8.jpg Data Auxiliary data
  Accessible without login Image file 9.jpg Data Auxiliary data
  Accessible without login Image file tiger clipart.gif Icon Icon image

  Files folder image Files  /  uploads  /  thumbs  
File Role Description
  Accessible without login Image file 1.jpg Icon Icon image
  Accessible without login Image file 10.jpg Icon Icon image
  Accessible without login Image file 11.jpg Icon Icon image
  Accessible without login Image file 2.jpg Icon Icon image
  Accessible without login Image file 3.jpg Icon Icon image
  Accessible without login Image file 4.jpg Icon Icon image
  Accessible without login Image file 5.jpg Icon Icon image
  Accessible without login Image file 6.jpg Icon Icon image
  Accessible without login Image file 7.jpg Icon Icon image
  Accessible without login Image file 8.jpg Icon Icon image
  Accessible without login Image file 9.jpg Icon Icon image

 Version Control Unique User Downloads Download Rankings  
 94%
Total:108
This week:0
All time:9,660
This week:89Up