caSimpleGalleryPlugin - 1.0.0

caSimpleGalleryPlugin is a simple plugin to display dynamic photo galleries

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
caSimpleGalleryPlugin 1.0.0stable for sf 1.2sf 1.1 BSD Style
Plugin image
4
users
Sign-in
to change
your status

caSimpleGalleryPlugin is a simple plugin to display dynamic photo galleries. Plugin is based on the Strategy design pattern so that in a very quick way you can change how to display images by creating your own class (as is the case of widgets)

caSimpleGalleryPlugin

Overview

caSimpleGalleryPlugin is as the name suggests a simple plugin to create and display dynamic photo gallery.

Plugin based on a images from filesystem, the plugin to work properly do not have connections in the database.

Plugin is based on the Strategy design pattern so that in a very quick way you can change how to display images by creating your own class (as is the case of widgets)

At present, there are two engines display photos * SmoothGallery - http://smoothgallery.jondesign.net * s3Slider - http://www.serie3.info/s3slider/

Changing the engine of one display to another is very simple:

[php] $caGallery = new caSimpleGallery(); $caGallery->render( new caJdGallery() ); //OR $caGallery->render( new caS3SliderGallery() );

Installation

  • Install depends ( sfImageTransformPlugin )

  • Download the package from the Symfony repo

  • Put extracted files to plugins directory

  • Publish assets

    $ symfony plugin:publish-assets

  • App.yml to a file, you can add options

    [php] all: ca_simple_gallery_plugin: images_dir: "caSimpleGalleryPlugin/images/galleries/images" thumbs_dir: "caSimpleGalleryPlugin/images/galleries/thumbs" thumb_def_width: 100 thumb_def_height: 100

  • clear cache

    $ symfony cache-clear

Sample usage

  • The directory /caSimpleGalleryPlugin/images/galleries/images upload a few photos (these may be in folders)

  • In the file share at any point you can use plug

    [php] $this->caGallery = new caSimpleGallery(); //if the files are in folders, you can download them by setting $this->caGallery->setRecursive( true );

  • Now, in your view, corresponding to the shares should only cause

    [php] render( new caJdGallery() ); ?>

Stories

  • You may upload images via FTP
  • The system automatically creates thumbnails of photos:
    • ...When you first view photo
    • ...Manually by launching a task
  • The user is able to quickly replace the default way of displaying photos
  • API (eg for export to RSS or suction to flash gallery)

TODO

  • tests
  • Add a task to create thumbnails
  • Make it possible to configure the type of classes caBaseGallery
  • Add API for AJAX Galleries

Developers

Name Status Email
gravatar Damian Kopiec lead moc.liamg <<ta>> naimad.ceipok

License

Show source

New BSD Lincence
----------------

Copyright (C) 2009 Codearts.pl
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Codearts nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.