Giter VIP home page Giter VIP logo

pholio's Introduction

Show all images in a folder with PHP

strongly based in easy-folio

A simple webpage to display all images in a folder. It requires PHP.

Images will display up to a max width of 900 pixels. Images larger than 900 pixels will show their full size if you click it.

You can link to a specific image as they're link anchored. Just click on the specific image and copy the browser URL.

Demo

Setup

The easy way

This works out of the box, so you can either Git clone the repository, or download the zip.

The other way

Add ins-imgs.php and ins-imgs.css in your root folder (or wherever your index file is).

In your index HTML, insert this:

<!-- insert images here -->
<script src="ins-imgs.php"></script>

Settings

In ins-imgs.php you can find the following settings:

    # Path to image folder
    $imageFolder = 'img/';

    # Show only these file types from the image folder
    $imageTypes = '{*.jpg,*.JPG,*.jpeg,*.JPEG,*.png,*.PNG,*.gif,*.GIF}';

    # Set to true if you prefer sorting images by name
    # If set to false, images will be sorted by date
    $sortByImageName = false;

    # Set to false if you want the oldest images to appear first
    # This is only used if images are sorted by date (see above)
    $newestImagesFirst = true;

The img folder is a symlink to your image folder:

~$ ln -s  /Users/arocha/Pictures /usr/local/var/www/photos/img

Make the changes needed for your setup.

Help, bugs, pull requests, etc.

Very welcomed.

Customized implementations

Easy Folio (Demo) by Lukas Spieker

pholio's People

Watchers

James Cloos avatar Alex Rocha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.