2017 © Pedro Peláez
 

cakephp-plugin uploadedimage

Helper to output the current image and upload field for the Upload plugin

image

davidyell/uploadedimage

Helper to output the current image and upload field for the Upload plugin

  • Thursday, May 29, 2014
  • by davidyell
  • Repository
  • 2 Watchers
  • 0 Stars
  • 254 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

UploadedImageHelper

This is a quick helper to output a form field for the Jose Gonzalez Upload plugin along with the current image displayed as a thumbnail, with a link to view it's original., (*1)

Requirements

Cake 2.x
Upload plugin - https://github.com/josegonzalez/upload, (*2)

Installation

You will need to install the plugin into app/Plugin/UploadedImage and then activate it in your app/Config/bootstrap.php with CakePlugin::load('UploadedImage'); unless you are already using loadAll()., (*3)

Then add the helper file into your helpers array in your controller.
public $helpers = array('UploadedImage.UploadedImage');, (*4)

The helper take some settings, which you can find in the source $settings property. These can be overwritten by passing new settings into the helper when you add it to the controller., (*5)

public $helpers = array(
    'UploadedImage' => array(
        'field' => 'logo', // Name of the db field - should match the 'field' in your Model's Upload settings
        'dir' => 'logo_dir', // Name of the directory - should match 'dir' in your Model's Upload settings
    )
);

Usage

echo $this->UploadedImage->display();, (*6)

Todo

  • Read the model configuration to save on configuring it
  • Allow multiple upload fields

The Versions

29/05 2014

dev-master

9999999-dev

Helper to output the current image and upload field for the Upload plugin

  Sources   Download

The Requires

 

29/05 2014

0.0.3

0.0.3.0

Helper to output the current image and upload field for the Upload plugin

  Sources   Download

The Requires

 

29/05 2014

0.0.2

0.0.2.0

Helper to output the current image and upload field for the Upload plugin

  Sources   Download

The Requires

 

09/05 2014

0.0.1

0.0.1.0

Helper to output the current image and upload field for the Upload plugin

  Sources   Download

The Requires