Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Gallery Manager extension

$
0
0
Often we have images gallery in our application. So I have written extension to manage images gallery.

Features:
* Optional image name/description
* Multiple image upload in modern browsers(single image upload in old browsers)
* Arrange images in gallery, using drag and drop
* Multiply image operations (edit meta information, image removal)
* Multiply localizations (currently en/ru/uk )

To use you need:
* Twitter bootstrap css (widget use some classes from it)
* Image extension

Screenshot: : Screen Shot 2012-07-08 at 4.08.41 AM.png

Gallery Manager usage instructions

  • Checkout source code to your project, for example to ext.galleryManager.
  • Install and configure image component(bitbucket.org/z_bodya/yii-image).
  • Import gallery models to project, by adding "ext.galleryManager.models.*" to import in config/main.php
  • Add GalleryController to application or module controllerMap.
  • Configure and save gallery model


Example:
$gallery = new Gallery();
$gallery->name = true;
$gallery->description = true;
$gallery->versions = array(
    'small' => array(
        'resize' => array(200, null),
    ),
    'medium' => array(
        'resize' => array(800, null),
    )
);
$gallery->save();

Render widget for gallery created above:

$this->widget('GalleryManager', array(
    'gallery' => $gallery,
    'controllerRoute' => '/admin/gallery', //route to gallery controller
));


Using GalleryBehavior
Using gallery behavior is possible to add gallery to any model in application.

GalleryBehavior is under development(not tested yet) and will be finished soon, so usage examples also will be later.

Enjoy:
 z_bodya-yii-image-880649518c00.tar.gz (9.37K)
: 31
 z_bodya-gallerymanager-347553bc6bdc.tar.gz (9.7K)
: 19

Extension page

Fork me on bitbucket.

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>