prettyphoto Encapsulates the prettyPhoto jQuery lightbox clone

  1. Requirements
  2. Inheritance
  3. Properties
  4. Installation
  5. Usage
  6. Resources

PrettyPhoto encapsulates the prettyPhoto jQuery lightbox clone.

prettyPhoto is a full blown media lightbox that supports images, videos, flash, YouTube, iframes and ajax, or any other content through its _custommarkup option (see the custom content tutorial for details)

Requirements

Tested with Yii 1.1.8, but should work with any version

Inheritance

PrettyPhoto » CWidget » CBaseController » CComponent

Properties

Defined by PrettyPhoto
  • assetsUrl string URL to PrettyPhoto assets. If empty the assets under the widget's directory will be published.
  • cssFile string Name of the CSS file to be published. This must be in the css directory under the assets URL. Defaults to 'prettyPhoto.css'
  • htmlOptions array HTML options for the enclosing tag.
  • gallery boolean Whether prettyPhoto is in gallery (many items) or single item mode. Defaults to true (gallery mode)
  • options array Additional options for prettyPhoto. Defaults to array()
  • scriptFile string Name of the javaScript file to be published. This must be under the assets URL. Defaults to 'jquery.prettyPhoto.js'
  • tag string The enclosing tag. Defaults to 'div'
  • theme string The prettyPhoto theme to use. Built-in prettyPhoto themes are: _'darkrounded', _'darksquare', 'facebook', _'lightrounded', and _'lightsquare'. Defaults to 'facebook'

See the CWidget documentation for inherited properties.

Installation

Extract the files in the download to the application directory of your choice.

Usage

To use the widget put the following code in a view:

$this->beginWidget('path.to.PrettyPhoto', array
  id'=>'pretty_photo',
  // prettyPhoto options
  'options'=>array(
    'opacity''=>0.60,
    'modal'=>true,
  ),
));

echo Content links here;

$this->endWidget('path.to.PrettyPhoto');

Content links do not require the rel="prettyPhoto" attribute; this is added by the widget.

By configuring the options property, you may specify the options that need to be passed to prettyPhoto. Please refer to the prettyPhoto documentation for possible options (name=>value pairs).

Resources

Demos

prettyPhoto Documentation

17 0
22 followers
2 451 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Yeti
Created on: Aug 23, 2011
Last updated: 6 years ago

Downloads

show all

Related Extensions