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


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source



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 - * s3Slider -

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

$caGallery = new caSimpleGallery( new caJdGallery() );
$caGallery->render( );
$caGallery->render( new caS3SliderGallery() );


  • 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

        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

    $this->caGallery = new caSimpleGallery( new caJdGallery() );
    //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 echo $caGallery->render( ); ?>


  • 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)


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