Yii + Gallery

Yii + Gallery

What do you use/choose to use for a gallery with Yii?

I found only one extension, EGallery, but it is still very "weak" as to compare with any other today galleries.

If you use other products please specify your opinion, positive/negative feedback integrating with Yii.



Does anybody use [advanced] galleries with Yii? :)


When I did a gallery, I used a javascript gallery that our desiner found on internet.

Since some month ago there wasn’t an integrated gallery.

I too looked at EGallery and found it difficult to work with and lacking features like theming or text for the images to describe what is in the image.

I am currently using EasyPhpAlbum Version 1.4.4 and have found it passable as a solution for Yii.

All I do is add an iframe in the view that I want to use to display my gallery, and point the iframe at the index.php file for EasyPhpAlbum.

The nice thing is that it is a single php file (index.php) that you place in a directory with your gallery images.


mkdir ${WEBROOT}/images/mygallery

cp /path/to/images/some_image.jpg ${WEBROOT}/images/mygallery/

cp index.php ${WEBROOT}/images/mygallery/

# index.php is copied from EasyPhpAlbum zip file

vim  ${WEBROOT}/protected/views/site/gallery1/index.php

# Add the following lines to the view you choose

# <iframe src='/images/mygallery/index.php' width="100%" height="640px">

#    <p>Your browser does not support iframes.</p>

# </iframe>

Before anyone complains, YES I realize that an IFrame is not as elegant a solution as one might desire but in the lack of a better (simple) solution… this works and appears integrated.

Besides ease of install/integration, here are some other features that I enjoy:

  1. Comes with an admin tool to make it easy to annotate text to images

  2. Admin tool allows you to configure themes and many aspects of how your gallery looks

  3. Individual configs (written as configuration.php once saved) allow for password access only to gallery or admin tool

  4. Allows IP restrictions for admin tool

  5. No Database required

  6. Comes with really neat prebuilt themes that change the shape and border of the images to be anything from notepad/binder borders to simple drop shadows and small single/double pixel borders.

  7. Is a nice php solution that does not require loads of java knowledge