2017 © Pedro Peláez
 

yii2-extension yii2-fotorama-widget

fotorama image gallery yii2 widget

image

metalguardian/yii2-fotorama-widget

fotorama image gallery yii2 widget

  • Tuesday, January 16, 2018
  • by MetalGuardian
  • Repository
  • 3 Watchers
  • 14 Stars
  • 7,934 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

DEPRECATED

Unfortunately, original Fotorama gallery is no longer maintained. You still can use this extension if fotorama fits your project. Check github thread for alternatives., (*1)

Fotorama Yii2 widget

This yii2 extension is a wrapper for the powerful jQuery gallery Fotorama., (*2)

Latest Stable Version Total Downloads Latest Unstable Version License, (*3)

Scrutinizer Code Quality Code Coverage Build Status Code Climate, (*4)

Installation

Install this extension using composer., (*5)

composer require metalguardian/yii2-fotorama-widget

You should have configured asset-packagist repository in your project's composer.json or installed fxp/composer-asset-plugin plugin. For more information see Yii2 bower/npm assets manual, (*6)

Usage

First way:, (*7)


<?php $fotorama = \metalguardian\fotorama\Fotorama::begin( [ 'options' => [ 'loop' => true, 'hash' => true, 'ratio' => 800/600, ], 'spinner' => [ 'lines' => 20, ], 'tagName' => 'span', 'useHtmlData' => false, 'htmlOptions' => [ 'class' => 'custom-class', 'id' => 'custom-id', ], ] ); ?> <img src="http://s.fotorama.io/1.jpg"> <img src="http://s.fotorama.io/2.jpg"> <img src="http://s.fotorama.io/3.jpg"> <img src="http://s.fotorama.io/4.jpg"> <img src="http://s.fotorama.io/5.jpg"> <?php \metalguardian\fotorama\Fotorama::end(); ?>

Second way:, (*8)


<?php echo \metalguardian\fotorama\Fotorama::widget( [ 'items' => [ ['img' => 'http://s.fotorama.io/1.jpg', 'id' => 'id-one',], ['img' => 'http://s.fotorama.io/2.jpg',], ['img' => 'http://s.fotorama.io/3.jpg',], ['img' => 'http://s.fotorama.io/4.jpg',], ], 'options' => [ 'nav' => 'thumbs', ] ] ); ?>

To use CDNJS put this before run widget, will be used current version:, (*9)


<?php \metalguardian\fotorama\Fotorama::$useCDN = true; ?>

Or select custom version:, (*10)


<?php \metalguardian\fotorama\Fotorama::$useCDN = '4.5.0'; ?>

To setup default Fotorama widget options to all galleries on page:, (*11)


<?php \metalguardian\fotorama\Fotorama::setDefaults( [ 'nav' => 'thumbs', 'spinner' => [ 'lines' => 20, ], 'loop' => true, 'hash' => true, ] ); ?>

For complete documentation of Fotorama and all widget options please refer to the official Fotorama page, (*12)

License

yii2-fotorama-widget is released under the MIT License. See the bundled LICENSE for details., (*13)

The Versions

16/01 2018

dev-master

9999999-dev https://github.com/MetalGuardian/yii2-fotorama-widget

fotorama image gallery yii2 widget

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Pushkin

extension yii2 widget fotorama

16/01 2018

1.0.1

1.0.1.0 https://github.com/MetalGuardian/yii2-fotorama-widget

fotorama image gallery yii2 widget

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Pushkin

extension yii2 widget fotorama

19/04 2015

1.0.0

1.0.0.0 https://github.com/MetalGuardian/yii2-fotorama-widget

fotorama image gallery yii2 widget

  Sources   Download

MIT

The Requires

 

by Ivan Pushkin

extension yii2 widget fotorama