SpamBlocker

Spam Blocker is a CakePHP Behavior that automatically before after a comment is made. Each comment is tested upon a point system to determine if it should be approved, set to pending (high points), or marked as spam / deleted (low points).

Uploader Version Logs

Package: Plugin: File Uploader and Image Transformer
Category: CakePHP

Below is a list of all files and every available version for the Uploader script.
Each file is accompanied by a change log. Be cautious in using older versions, they may buggy.

Version: 3.5
Requires: PHP 5.2, CakePHP 2
Tested On: PHP 5.3, CakePHP 2.0.5
Released: Sun, Apr 22nd 2012, 15:27

  • Added file overwrite settings for transform methods [Issue #50] (overwrite settings are set to false by default)
  • Fixed weirdness with append and prepend [Issue #46]
  • Fixed a bug with uppercase file extensions
  • Rewrote Uploader::crop() to maintain aspect ratio and fix wrong calculations [Issue #51]

Version: 3.4
Requires: PHP 5.2, CakePHP 2
Tested On: PHP 5.3, CakePHP 2.0.5
Released: Sun, Apr 22nd 2012, 15:24

  • Updated Uploader::upload() to accept a $_FILES array to support nested file input uploading [Issue #44]

Version: 3.3
Requires: PHP 5.2, CakePHP 2.0
Tested On: PHP 5.3, CakePHP 2.0.5
Released: Wed, Feb 29th 2012, 23:17

  • Added a saveAsFilename option to AttachmentBehavior to save an upload without the relative path [Issue #41]
  • Added more mime type support [Issue #42]
  • Added mode orientation support to Uploader::resize()
  • Added tons more test cases
  • Fixed an undefined offset error when uploading without a model
  • Fixed a bug where a custom name wasn't being used in chained transforms
  • Refactored Uploader::resize() so that aspect and expand work in unison

Version: 3.2
Requires: PHP 5.2, CakePHP 2.0
Tested On: PHP 5.3, CakePHP 2.0.5
Released: Wed, Feb 15th 2012, 22:49

  • Fixed a Linux upload issue regarding multiple transforms
  • Fixed Uploader::addMimeType() to not overwrite existing values
  • Fixed Uploader::crop() when both height and width are equal
  • Fixed strict errors
  • Fixed issue with transforms not inheriting custom name [Issue #36]
  • Fixed a bug with multiple model uploading with AttachmentBehavior
  • Recursively delete files if transforming overwrites the original
  • Can now accept a model method for file name formatting [Issue #35]
  • Added an aspect setting to Uploader::resize() [Issue #40]
  • Added an allowEmpty setting to AttachmentBehavior to allow empty file uploads to continue [Issue #38]

Version: 3.1
Requires: PHP 5.2, CakePHP 2.0
Tested On: PHP 5.3, CakePHP 2.0.3
Released: Sun, Dec 11th 2011, 19:21

  • Added append and prepend support to Uploader::upload() and AttachmentBehavior
  • Added support for slashes within append and prepend options to allow for folder organization
  • Fixed a bug with FileValidationBehavior::extension()

Version: 3.0
Requires: PHP 5.2, CakePHP 2.0
Tested On: PHP 5.3, CakePHP 2.0.3
Released: Tue, Nov 29th 2011, 22:53

  • Updated to CakePHP 2.0 (not backwards compatible with 1.3)
  • Converted the UploaderComponent into a stand-alone vendor class
  • Converted Uploader::bytes(), addMimeType(), checkMimeType(), mimeType() and ext() to static methods
  • Added an Uploader::setup() method to apply settings
  • Added localized messages for upload errors and file validation
  • Added dynamic variables to file validation messages
  • Deleted the S3TransferComponent; use Vendor/S3 instead
  • Refactored the Uploader class properties
  • Refactored AttachmentBehavior::beforeDelete() to smartly detect column names and delete appropriate files
  • Refactored and improved S3 support within the AttachmentBehavior
  • Replaced HttpSocket with file_get_contents()

Version: 2.8
Requires: PHP 5.2, CakePHP 1.3
Tested On: PHP 5.3, CakePHP 1.3.8
Released: Tue, Nov 29th 2011, 22:50

  • Added support for AJAX iframe uploading
  • Added support for file uploads via XHR (AJAX)
  • Changed it so that initialize() isn't called by FileValidation
  • Changed the filename formatting to require a global function, so that the component and behavior can utilize it
  • Using $_FILES instead of Controller::$data since it would be more accurate depending on the request type
  • Fixed incorrectly named variable in S3Transfer::transfer()
  • Fixed problems with empty uploads and imports

Version: 2.7
Requires: PHP 5.2, CakePHP 1.3
Tested On: PHP 5.3, CakePHP 1.3.8
Released: Sun, May 22nd 2011, 20:21

  • Added a $baseDir property so you can define your own base
  • Added a formatPath() and formatFilename() to support these changes
  • Added better GD library validation
  • Added recursive folder creation
  • Added support to allow a custom model method to format a filename
  • Added import() to copy a local file
  • Added importRemote() to copy a remote file
  • Added import functionality to Attachment
  • Adding _loadExtension() and checkMimeType() methods
  • Can pass false to append to not append anything
  • Converted private members to protected
  • Fixed a bug with uppercase extensions
  • Fixed a bug with file validation passing arrays
  • Fixed incorrectly named variable for S3Transfer
  • Updated dimensions() to validate multiple paths
  • Refactoring _validates() and FileValidation
  • Refactoring uploading within attachments to logically choose import or upload

Version: 2.6
Requires: PHP 5.2, CakePHP 1.3
Tested On: PHP 5.3, CakePHP 1.3.4
Released: Tue, Sep 28th 2010, 20:14

  • Added a $rollback argument to uploadAll() to break and delete all previously uploaded files
  • Added a minimum/maximum validation setting for image height/width
  • Added a prepend option to certain transformers
  • Added a skipSave option
  • Fixed a bug when Security component is enabled and it breaking uploads
  • Fixed a bug when parsing out the correct files data from a multi-dimensional array
  • Fixed a bug where pjpeg's were not transforming
  • Converted to using the built in Config setup
  • Removed the AppController and AppModel
  • Removed dimensions() in place of new validation rules
  • Rewrote the file validation class
  • Can now save the file meta info into the database with the Attachment behavior
  • Can now return an array of data for transforming methods by passing true as a second param
  • Can now define a default path in Attachment if the file field is left empty

Version: 2.5
Requires: PHP 5, CakePHP 1.2
Tested On: PHP 5.3, CakePHP 1.2.5
Released: Sat, Mar 6th 2010, 18:26

  • Added a controller and model that I use for testing purposes
  • Added 5 constants to use for UploaderComponent::crop(): LOC_TOP, LOC_BOT, LOC_LEFT, LOC_RIGHT, LOC_CENTER
  • Added root path checking in UploaderComponent::delete()
  • Added an S3 (Amazon Simple Storage) transfer component
  • Added the S3 support into the AttachmentBehavior
  • Fixed a bug with UploaderComponent::dimensions() throwing errors
  • Fixed a bug with UploaderComponent::flip() not working
  • Rewrote UploaderComponent::__validates() with better logic and checking
  • Rewrote UploaderComponent::__parseData() to support multiple models and files
  • Rewrote AttachmentBehavior to accept multiple transforms of the same type
  • Changed filename auto-append from timestamp to incremental numbering
  • Allow for nothing to be appended to the filename

Version: 2.4
Requires: PHP 5, CakePHP 1.2
Tested On: PHP 5.3, CakePHP 1.3
Released: Sun, Jan 10th 2010, 16:14

  • Added IE8 specific mime types: image/pjpeg, image/x-png
  • You can now use multiple types of transforms when using the Attachment behavior, simply pass a new index of method ('method' => 'resize'). If no method is found, it will use the array index.

Version: 2.3
Requires: PHP 5, CakePHP 1.2
Tested On: PHP 5.2.5, CakePHP 1.2.5
Released: Sun, Oct 4th 2009, 17:26

  • Upgraded to PHP 5 only
  • Added the Attachment Behavior so that files can be attached to Models for automatic file uploading and database saving
  • Added 3 constants for the components flip() method: DIR_VERT, DIR_HORI, DIR_BOTH
  • Rewrote flip() so that the direction is now an option and not an argument
  • Fixed a misspelling of memory_limit

Version: 2.2
Requires: PHP 4, CakePHP 1.2
Tested On: PHP 5.2.5, CakePHP 1.2.4.8284
Released: Wed, Sep 16th 2009, 20:21

  • Added the method parseData() to the uploader component to properly parse the controllers data for $_FILES related data
  • Added support for multi-byte and UTF-8 characters
  • Renamed the uploader config class
  • Fixed a huge bug where file validation didn't work, all thanks to a missing variable reference to the parent Model

Version: 2.1
Requires: PHP 4, CakePHP 1.2
Tested On: PHP 5.2.5, CakePHP 1.2.3.8166
Released: Fri, Jul 31st 2009, 17:44

  • Removed all constructors and placed their code in initialize() or setup()
  • Rewrote utility libraries to only initialize when needed
  • Rewrote the file uploading checking in setup(), if file uploads are disabled in php.ini, the uploader is disabled
  • Rewrote bytes() to return is uppercase
  • Fixed some problems with crop() returning weird results, still a problem when putting weird custom dimensions
  • Added a "expand" option to resize(), to check if it should expand larger then its original
  • Added more file validation in validates()
  • Renamed the behavior to FileValidation, as well as its filename

Version: 2.0
Requires: PHP 4, CakePHP 1.2
Tested On: PHP 5.2.5, CakePHP 1.2.3.8166
Released: Thu, Jul 30th 2009, 21:49

  • Added a check for the GD library
  • Added the initialize() method to grab the model data automatically
  • Added the crop(), flip(), resize(), scale() and transform() methods for image transformation
  • Added the uploadAll() method for multiple uploads
  • Added a $current property to allow multiple files
  • Removed all interal errors and logging
  • Removed the vendors directory and added a config directory
  • Removed unneeded methods
  • Rewrote all methods to remove excess code
  • Rewrote the _destination() method to be useable within all methods, not just upload()
  • Rewrote the upload() method to be faster and to save the height and width if file is an image
  • Rewrote the upload() method to accept a string as the input name, instead of the $this->data path
  • Rewrote the validates() method to be combined into one method, instead of 3 sub methods
  • Rewrote the _return() method to work with image transformations and returned data
  • Rewrote how the behavior validaton settings are written
  • Fixed a problem with the behavior required() always failing
  • Cleaned up the convenience methods

Version: 1.3
Requires: PHP 4, CakePHP 1.2
Tested On: PHP 5.2.5, CakePHP 1.2.3.8166
Released: Tue, Jun 30th 2009, 15:42

  • First initial release of the Uploader plugin