2017 © Pedro Peláez
 

yii2-extension yii2-fancybox

fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.

image

newerton/yii2-fancybox

fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.

  • Wednesday, March 29, 2017
  • by newerton
  • Repository
  • 5 Watchers
  • 33 Stars
  • 27,712 Installations
  • PHP
  • 13 Dependents
  • 0 Suggesters
  • 33 Forks
  • 0 Open issues
  • 1 Versions
  • 6 % Grown

The README.md

yii2-fancybox

fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. http://fancyapps.com/fancybox/, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require newerton/yii2-fancybox

or add, (*4)

"newerton/yii2-fancybox": "^1.0"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

 'a[rel=fancybox]',
    'helpers' => true,
    'mouse' => true,
    'config' => [
        'maxWidth' => '90%',
        'maxHeight' => '90%',
        'playSpeed' => 7000,
        'padding' => 0,
        'fitToView' => false,
        'width' => '70%',
        'height' => '70%',
        'autoSize' => false,
        'closeClick' => false,
        'openEffect' => 'elastic',
        'closeEffect' => 'elastic',
        'prevEffect' => 'elastic',
        'nextEffect' => 'elastic',
        'closeBtn' => false,
        'openOpacity' => true,
        'helpers' => [
            'title' => ['type' => 'float'],
            'buttons' => [],
            'thumbs' => ['width' => 68, 'height' => 50],
            'overlay' => [
                'css' => [
                    'background' => 'rgba(0, 0, 0, 0.8)'
                ]
            ]
        ],
    ]
]);

echo Html::a(Html::img('/folder/thumb.jpg'), '/folder/imagem.jpg', ['rel' => 'fancybox']);
?>

Hint: Do not forget to declare the Html class at the top of the file., (*7)

use yii\helpers\Html;

The Versions

29/03 2017

dev-master

9999999-dev

fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.

  Sources   Download

BSD-3-Clause

The Requires

  • yiisoft/yii2 *
  • bower-asset/jquery-mousewheel >=3.1.13
  • bower-asset/fancybox ~2.1.5
  • php >=5.4.0

 

extension yii2 fancybox fancyapps