Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This plugin helps to create galleries of photos.
PHP
Branch: master
Failed to load latest commit information.
Control
DataProvider * Merge branch 'repairs'
Model * Merge branch 'repairs'
AControl.php * abstract classes renamed; Multiplier used for subcontrols; snippet …
AModel.php * abstract classes renamed; Multiplier used for subcontrols; snippet …
IDataProvider.php * Merge branch 'repairs'
ImageHelper.php * Merge branch 'repairs'
README.md
license.txt * add license and copyright, update comments, small refactoring

README.md

Gallery Nette Plugin

Description

Addon helps to create galleries of photos.

This is build for PHP 5.3.* and based on Nette Framerwork.

Dependencies

It depends on Nette Framerwork, dibi, MultipleFileUploader and Visual Paginator is also required for paging. If you want to use your own implementation of paginator you have to change one line in code.

Notes

  • Database layer can be replaced with DataProvider.
  • MultipleFileUploader is optional but recomanded.

Installation

  1. Copy all files into folder with your project (libs dir).

  2. Install all database tables into your database. If it is needed change DataProvider. Default database structure is in /DataProvider/mysql.sql If you want to add custom columns just edit existing tables.

  3. For easier usage create services for model layer. Example:

    parameters:
        imageHelper:
            baseUrl: http://example.com/
            tempDir: files/temp
        gallery:
            basePath: %wwwDir%/files/gallery
    services:
        imageHelper:
            class: \ImageHelper(@cache, %imageHelper.baseUrl%,  %imageHelper.tempDir%)
        galleryDataProvider:
            class: \stekycz\gallery\DataProvider\Dibi(@database)
        galleryItemModel:
            class: \stekycz\gallery\models\Item(@galleryDataProvider, %gallery.basePath%)
        galleryGroupModel:
            class: \stekycz\gallery\models\Group(@galleryDataProvider, %gallery.basePath%)
  1. Use plugin and create controls:
    new GroupControl($this, 'galleries',
        $this->context->imageHelper,
        $this->context->galleryGroupModel,
        $this->context->galleryItemModel,
        $this->context->galleryDataProvider->namespaces,
        'Homepage:gallery'
    );
    new ItemControl($this, 'photos',
        $this->context->imageHelper,
        $this->context->galleryGroupModel,
        $this->context->galleryItemModel,
        $id
    );

Notes

In example templates is used fancybox javascript library for photogalleries and Twitter Bootstrap. Templates should be changed/replaced for using in your own project.

Author

The author of the addon is Martin Štekl.

Something went wrong with that request. Please try again.