PHPackages                             nirvana-msu/yii2-prettyphoto - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. nirvana-msu/yii2-prettyphoto

ArchivedYii2-extension

nirvana-msu/yii2-prettyphoto
============================

Yii2 extension for prettyPhoto jQuery lightbox clone

61.3k2PHP

Since Mar 6Pushed 11y ago2 watchersCompare

[ Source](https://github.com/nirvana-msu/yii2-prettyphoto)[ Packagist](https://packagist.org/packages/nirvana-msu/yii2-prettyphoto)[ RSS](/packages/nirvana-msu-yii2-prettyphoto/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-prettyphoto
================

[](#yii2-prettyphoto)

Yii2 widget for prettyPhoto jQuery lightbox clone [scaron/prettyphoto](https://github.com/scaron/prettyphoto)

Yii2 [extension page](http://www.yiiframework.com/extension/yii2-prettyphoto)

Installation
------------

[](#installation)

### Composer

[](#composer)

First of all, add extension to your composer.json:

```
{
    "require": {
        "nirvana-msu/yii2-prettyphoto": "1.0.*@dev"
    }
}
```

Unfortunately, [scaron/prettyphoto](https://github.com/scaron/prettyphoto) repository has not been updated in several years and does not contain `bower.json` which would allow composer to install it.

Instead of copying over the files manually or creating yet another fork just to add `bower.json`, this extension defines the required repository package inline. Since composer does not inherit "repositories" section, you have to add the same section to your own composer.json:

```
"repositories": [
        {
            "type": "package",
            "package": {
                "name": "bower-asset/jquery-prettyPhoto",
                "type": "bower-asset-library",
                "version": "3.1.4",
                "source": {
                    "url": "https://github.com/scaron/prettyphoto",
                    "type": "git",
                    "reference": "master"
                }
            }
        }
    ]
```

After this just update your dependencies as usual, e.g. by running `composer update`

\##Widget Configuration

- `$target = "a[rel^='prettyPhoto']"` *string* jQuery target selector
- `$pluginOptions = []` *array* PrettyPhoto plugin options. For more information refer to [prettyPhoto documentation](http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/)

\##Sample usage

Rendering widget will produce the necessary javascript code to register plugin.

Using default configuration:

```
PrettyPhoto::widget();
```

Customizing some plugin options:

```
PrettyPhoto::widget([
    'target' => "a[rel^='prettyPhoto']",
    'pluginOptions' => [
        'opacity' => 0.60,
        'theme' => PrettyPhoto::THEME_DARK_SQUARE,
        'social_tools' => false,
        'autoplay_slideshow' => true,
        'modal' => true
    ],
]);
```

To activate plugin, add `rel=”prettyPhoto”` attribute for single images and `rel="prettyPhoto[gallery-name]”` for galleries. These attributes must match target selector as configured by `$target` property. Refer to [prettyPhoto documentation](http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/) for more examples.

\##License

Released under GPL-2.0 license, same as underlying [prettyPhoto](http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/) plugin.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a1a5dd972c2dcc6866be80df680b326649a14e85dd1586af5a8fbf46e9471d0c?d=identicon)[nirvana-msu](/maintainers/nirvana-msu)

---

Top Contributors

[![nirvana-msu](https://avatars.githubusercontent.com/u/5787387?v=4)](https://github.com/nirvana-msu "nirvana-msu (13 commits)")[![igor-khripun](https://avatars.githubusercontent.com/u/9419872?v=4)](https://github.com/igor-khripun "igor-khripun (1 commits)")

### Embed Badge

![Health badge](/badges/nirvana-msu-yii2-prettyphoto/health.svg)

```
[![Health](https://phpackages.com/badges/nirvana-msu-yii2-prettyphoto/health.svg)](https://phpackages.com/packages/nirvana-msu-yii2-prettyphoto)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
