lyiightbox This widget encapsulates LightBox2 script.

  1. Install
  2. Simple Usage
  3. Hide Images
  4. Grouping Images
  5. Change Log

Install

For install lyiightbox you have only to copy his files in /protected/extensions/lyiightbox folder.

Simple Usage

To use this widget with one image:

<?php
            $this->widget('ext.lyiightbox.LyiightBox2', array(
                'smallest' => '/path/to/thumb/images.jpg',
                'biggest' => '/path/to/biggest/image.jpg',
                'title' => 'Sample Image 1.'
            ));
?>

Hide Images

If you want, you can also hide some image with "visible" option. By default visible is set to true.

<?php
            $this->widget('ext.lyiightbox.LyiightBox2', array(
                'smallest' => '/path/to/thumb/images.jpg',
                'biggest' => '/path/to/biggest/image.jpg',
                'title' => 'Sample Image 1.'
            ));
            $this->widget('ext.lyiightbox.LyiightBox2', array(
                'smallest' => '/path/to/thumb/images.jpg',
                'biggest' => '/path/to/biggest/image.jpg',
                'title' => 'Sample Image 1.',
                'visible' => false
            ));
?>

Grouping Images

If you put more images in the same group, you can just show the first one and hide the others. The others must have the same group name. By default, all images stay in "_" group. If you want, you can specify it:

<?php
            $this->widget('ext.lyiightbox.LyiightBox2', array(
                'smallest' => '/path/to/thumb/images.jpg',
                'biggest' => '/path/to/biggest/image.jpg',
                'title' => 'Sample Image 1.',
                'group' => 'sample'
            ));
            $this->widget('ext.lyiightbox.LyiightBox2', array(
                'smallest' => '/path/to/thumb/images.jpg',
                'biggest' => '/path/to/biggest/image.jpg',
                'title' => 'Sample Image 1.',
                'visible' => false,
                'group' => 'sample'
            ));
?>

Change Log

v1.1.1RC (January 2nd, 2011)
  • some bug fix
  • changed licence
v1.0 (September 27th, 2011)
  • created extension
11 0
10 followers
3 982 downloads
Yii Version: 1.1
License: MIT
Category: User Interface
Developed by: sensorario
Created on: Sep 19, 2011
Last updated: 6 years ago

Downloads

show all

Related Extensions