2017 © Pedro Peláez
 

library jv-easy-php-thumbnail

A generic module to generate thumbnail images for ZF2. Using this module you can generate thumbnails of images and display them on the site with an option to cache or use to generate and save in a folder.

image

jaimevalasek/jv-easy-php-thumbnail

A generic module to generate thumbnail images for ZF2. Using this module you can generate thumbnails of images and display them on the site with an option to cache or use to generate and save in a folder.

  • Thursday, September 26, 2013
  • by jaimevalasek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 72 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

JVEasyPhpThumbnail - JV Easy PHP Thumbnail

Create By: Jaime Marcelo Valasek, (*1)

Use this module to generate thumbnail to apply the images on your website., (*2)

This module is using the library Easy Php Thumbniail, to know how to use the methods access the author's website - http://www.mywebmymail.com/?q=content/easyphpthumbnail-class, (*3)

Futures video lessons poderam be developed and posted on the website or in http://www.zf2.com.br/tutoriais Youtube channel http://www.youtube.com/zf2tutoriais, (*4)

Installation

Download this module into your vendor folder., (*5)

After done the above steps, open the file config / application.config.php. And add the module with the name JVEasyPhpThumbnail., (*6)

Generating thumbnail in core and save it in the folder

  • Use this code to generate the thumbnail when you're uploading the image.
Thumblocation = $_SERVER['DOCUMENT_ROOT'] . "/imagens/thumbs/";
$phpThumb->Chmodlevel = '0755';
$phpThumb->Thumbsaveas = 'jpg';
$phpThumb->Thumbsize = 300;
$phpThumb->Cropimage = array(2,0,40,40,50,50);

$destination = $_SERVER['DOCUMENT_ROOT'] . "/imagens/";
$nomeDoArquivo = 'minhaImagem.jpg';

$phpThumb->Createthumb($destination . '/' . $nomeDoArquivo, 'file');

```

Using the view helper to create thumbnails
-----

When using the view helper will be generated and stored in the thumbnail folder Imagecache

```php

// Controller code
$arrConfigure = array();
$arrConfigure['Thumbsize'] = 300;
$arrConfigure['Quality'] = 55;
$arrConfigure['Cropimage'] = array(2,0,40,40,50,50);

return new ViewModel(array(
    'arrConfigure' => $arrConfigure
));

// View Code
nomedaimagem

The Versions

26/09 2013

dev-master

9999999-dev https://github.com/jaimevalasek/JVEasyPhpThumbnail

A generic module to generate thumbnail images for ZF2. Using this module you can generate thumbnails of images and display them on the site with an option to cache or use to generate and save in a folder.

  Sources   Download

BSD-3-Clause

The Requires

 

zf2