Skip to content
This repository has been archived by the owner on Jun 21, 2018. It is now read-only.

[ABADONED] This plugin helps to create galleries of photos.

License

Notifications You must be signed in to change notification settings

stekycz/gallery-nette-plugin

Repository files navigation

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.

About

[ABADONED] This plugin helps to create galleries of photos.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages