Справочники, инструменты, документация

PHP: Галереи

Очень простые галереи на PHP (из папки без базы данных).

Gallery-master

Gallery-master

    require_once("config.php");
    require_once("libs.php");

    // Загрузка файла на сервер

    $file = isset($_FILES['userfile']) ? $_FILES['userfile'] : "";
    if ($file != "") 
    {
        try
        {
            $fileName = validateAndUploadFile($file);
            createSmallImage($fileName);    
        }
        catch(Exception $e)
        {
            echo "<p style='color:red'>". $e->getMessage() . "</p>";
        }
    }

    // Получение имён изображений
    try
    {
        $images = getImages();
    }
    catch(Exception $e)
    {
        echo "<p style='color:blue'>". $e->getMessage() . "</p>";
    }

Скачать пример

PHP Галерея 1.0

PHP Галерея фотографий. Не требует MySQL базы данных.

Несмотря на небольшой размер имеет широкие возможности:

  • Создание привью для обложек альбомов;
  • поддержка основных графических форматов GIF, JPEG, PNG;
  • возможность загрузки одновременно до 5 фотографий;
  • возможность создавать новые альбомы;
  • защищённая паролем панель администратора;
  • возможность изменять подписи к альбомам;
  • конфигурируемый размер и количество изображений на страницу;
  • ограничиваемый размер файла;
  • возможность использования алиасов в названии альбомов;
  • автоматический ресайз фотографий;
  • пагинация среди альбомов (постраничный вывод альбомов)
  • большое количество настраиваемых параметров;
  • наложение на загружаемые фотографии водяных знаков;
  • не требует базы данных MySQL.

Скачать пример

Gallery

A simple, file based photo gallery

A simple, file based photo gallery

Description

My first project "Gallery", an online, file based photo gallery for any webserver with PHP. It is easy to install and has a simple, responsive design.

Installation

  1. Download this git repository
  2. Copy all the files on your webserver
  3. Open the page, where you put the files in the browser
  4. Choose a username and a password, to edit your photo gallery
  5. That's it!

Functions

Setup

The setup is automatically called, when opening the gallery for the first time. You will be prompted to enter a username and a password for your gallery

Login/Logout

Login by clicking on the "Login" button on the left down corner on the home screen or on the top right corner in an album and enter your username and password → You are now logged in.

Logout by clicking on the "Logout" button on the left down corner on the home screen or on the top right corner in an album → You are now logged out.

Albums

Create Album

You need to be signed in to create a new album.

  1. Click on "New Album" on the home screen
  2. Enter an album name and click on create

You have now a new, empty album

Delete Album

You need to be signed in to create an album.

  1. Open the album, you want to delete
  2. Scroll down to the bottom of the album
  3. Click on "Delete Album"

You have now deleted an album

Pictures

Add Pictures

You need to be signed in to add pictures.

  1. Open the album, where you want to add pictures
  2. Click on "Add Pictures"
  3. Drag & Drop or Browse for Pictures
  4. The pictures will be automatically uploaded, you can close the upload window. The page will reload, when the uploading is done

The new pictures will appear in your album

Download Pictures

You need to be signed in to download pictures.

  1. Open the album, where you want to download pictures
  2. On desktop click on the menu button of the picture and click on download or open the picture by clicking on it and click the download button on the top right corner. On mobile open the picture by clicking on it and click the download button on the top right corner.

The pictures will be downloaded.

Delete Pictures

You need to be signed in to delete pictures.

  1. Open the album, where you want to delete pictures
  2. On desktop click on the menu button of the picture and click on delete or open the picture by clicking on it and click the delete button on the top right corner. On mobile open the picture by clicking on it and click the delete button on the top right corner.

The pictures will be deleted.

Скачать пример

OneFileGallery

create a simple image gallery with a single php file

Features

  • easy to use
  • fully responsive (Bootstrap)
  • fullscreen Lightbox

How to use?

  • place your pictures in subfolders of the ./fotos folder like ./fotos/GalleryName/img.jpg
  • each folder will represent one gallery
  • OneFileGallery will render all your gallerys
  • The name of the gallerys is the name of the folder
  • "_" in the folder-names will be rendered to whitespaces

Скачать пример

simpleGallery

simpleGallery

Скачать simpleGallery

simple-php-gallery

A Simple PHP Photo Gallery Script. Scan a image folder and display imges. No database needed.

simple-php-gallery

Скачать пример

SimpleGallery - галерея которая сама делает превью

An image gallery script in one single PHP file.

Screenshot

It makes use of

Have a look at the wiki if you need more detailed documentation.

Features

  • Caching
  • EXIF and IPTC (geo tags, keywords, etc.)
  • Filter
  • Managing own favorites
  • ZIP download of many files

Requirements

  • PHP 5.2 or later

Installation

Copy or link the index.php file to the directory where your images are included.

Thats all!

Customization

Config

By default you can copy or link the following files to the directory where the gallery script is included (the "original meaning" can be ignored, but it is useful because of the order the files are loaded):

| Name | Original meaning

------------ | ------------ | ------------- 1 | sgConfig.json | Global config 2 | sgUsers.json | List of users 3 | sgCustom.json | Other custom

All existing values are overwritten by the data of the current file.

If a file of the list was not found, it is ignored.

Includes

By default you can copy or link a file called sgInclude.php to the directory where the gallery script is stored / linked.

These files are included BEFORE app class is initialized and AFTER config files were loaded.

If the file was not found, it is ignored.

Scripts

By default you can copy or link a file called sgScript.js to the directory where the gallery script is stored / linked.

The content of the file is included at the end of the output document AFTER custom style sheet was included.

If the file was not found, it is ignored.

Styles

By default you can copy or link a file called sgStyle.css to the directory where the gallery script is stored / linked.

The content of the file is included at the end of the output document BEFORE custom script was included.

If the file was not found, it is ignored.

SimpleGallery - галерея которая сама делает превью

Скачать пример