SfCropper Plugin…

Today, I wrote a simple plugin for Symfony, my favorite PHP MVC framework. It uses  scriptaculous.js and Cropper.js (developed by David Spurr ) to crop images and create cropped images using PHP GD library.

SfCropperSfCropper

You can download it by clicking here! Installation process is as simple as other Symfony plugins:

1.Unpack and Copy plugin files to your project plugin folder.

2. Enable module in your `settings.yml`:

  {{{

    all:

      .settings:

        enabled_modules:      [default, sfCropper]

  }}}

3. Put sfCropper web folder into your project web folder.

4. Clear you cache:

  {{{

    symfony cc

  }}}

5.Use it:

<?php

use_helper(‘cropper’);

//cropper_image($image_name,$image_id=’crop1′,$default_crop=1)

cropper_image(‘test.jpg’);

?>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s