Changelogs: AutoLogin v3.2

A new version of AutoLogin has been released, version 3.2. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 3.2
Tested On: PHP 5.3, CakePHP 2.0.3
Requires: PHP 5.2, CakePHP 2.0
Commit Hash: e0cedb439ee7e5789242cae8ecc04d07b0397a3f
Changes:

  • Added a model setting to the $settings property
  • Fixed a bug where Auth::user() would not return the full row data
  • Fixed a bug where the action would be empty (defaults to login)
  • Merged the username and password values from $fields into $settings
  • Removed the $fields property
  • Removed model detection via Auth::$authenticate in favor of the $settings model value
  • Updated the readme with information regarding Suhosin

Codebase Upgrades: Upgrading Forum v2.x to v2.2

In the newest 2.2 version of the Forum plugin, a subscription system was added. This system allows for users to subscribe to topics and forums and then receive email notifications at specific intervals. This feature required minor database changes so a new upgrade shell was added to handle this. You will only need to run the upgrade shell if you are upgrading from 2.0 or 2.1. If you are doing a fresh install, you can ignore this post and the upgrade shell.

Begin by downloading the latest 2.2 tag and uploading and overwriting the older version. Your forum will be broken until you run the upgrade shell and the following command. Once the command is executed, simply follow the on-screen instructions.

cake -app /path/to/app upgrade
Setting up the subscription notification cron

For the subscription emails to be sent out, the subscription shell will need to be triggered. The best way to accomplish this is to setup a cron job to be triggered every 24 hours (or another time of your liking). If you are unable to setup a cron job, you will need to disable the subscription system via the forum admin settings.

0 0 * * * /path/to/cake/console/cake -app /path/to/app subscription

By default the shell will find all new activity within the past 24 hours via the database timestamp (which is separate from the cron interval time). You can change this using the timeframe parameter. For example, if you want to send emails every hour instead of every 24 hours (quotes are required).

0 * * * * /path/to/cake/console/cake -app /path/to/app subscription -timeframe "1 hour" 

Hopefully this small guide helps you upgrade to 2.2, enjoy!

Changelogs: Forum v2.2

A new version of Forum has been released, version 2.2. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 2.2
Tested On: PHP 5.3, CakePHP 1.3.8
Requires: PHP 5.2, CakePHP 1.3
Commit Hash: 2a779098aae9e701a2502dd6140986074cbe4b28
Changes:

  • Added a subscriptions system for topics and forums (Issue #10)
  • Added a UpgradeShell which can be executed via console to handle complex version upgrades
  • Added a SubscriptionShell that can be setup via cron jobs to send user subscriptions at specific intervals
  • Added the AjaxHandlerComponent and TypeConverter to manage AJAX requests
  • Added topic subscriptions to the users dashboard
  • Refactored the InstallShell to use ConnectionManager::getDataSource() for all database queries instead of a Model, which fixes association errors (Issue #11)
  • Fixed any minor issues

Changelogs: Uploader v3.1

A new version of Uploader has been released, version 3.1. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 3.1
Tested On: PHP 5.3, CakePHP 2.0.3
Requires: PHP 5.2, CakePHP 2.0
Commit Hash: a0d0cbf3ac1062a31facab1b021969dcb39df49d
Changes:

  • 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()

Changelogs: Forum v2.1

A new version of Forum has been released, version 2.1. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 2.1
Tested On: PHP 5.3, CakePHP 1.3.8
Requires: PHP 5.2, CakePHP 1.3
Commit Hash: 93c192eebf704a997eb1a90ff1a394b28d8dacfb
Changes:

  • Added a users dashboard
  • Added Decoda validation during topic and post creation
  • Fixed the problem with using $this->here for form action URLs (Issue #9)
  • Updated Decoda to v3.1

Codebase Upgrades: Upgrading Uploader v2.8 to v3

The Uploader plugin has upgraded major versions from 2.8 (CakePHP 1.3) to 3.0 (CakePHP 2). Since this is not a backwards compatible change, the 3.0 version can only be used in CakePHP 2.

No more UploaderComponent

During the conversion process, the primary change is that the UploaderComponent was removed and turned into a stand-alone vendor class. This was done to further encourage the use of the AttachmentBehavior. Because of this change, you will need to manually initialize the Uploader in your Controller::beforeFilter() (only if you were using the component). The property settings are now passed as an array through the constructor.

// Before
public function beforeFilter() {
	$this->Uploader->tempDir = TMP;
}
// After
public function beforeFilter() {
	$this->Uploader = new Uploader(array('tempDir' => TMP));
}

By instantiating the class to $this->Uploader, all of the old code should still work as normal. This change also allows the possibility to use the Uploader anywhere in the application.

No more S3TransferComponent

The S3TransferComponent was trying to do something it shouldn't have. The component was removed in favor of the Vendor/S3 class that provides far more functionality. The AttachmentBehavior has also been updated to use the S3 class instead of the component.

Certain methods are now static

The bytes(), addMimeType(), checkMimeType(), mimeType() and ext() methods are now static.

Those should be the only changes you would need to make to support the new version. There are quite a few other changes, so be sure to check out the changelog and to also check out the updated documentation.

Codebase Upgrades: Upgrading AutoLogin v2.2 to v3

The AutoLogin component has upgraded major versions from 2.2 (CakePHP 1.3) to 3.0 (CakePHP 2), now 3.1. Since this is not a backwards compatible change, the 2.0 version can only be used in CakePHP 2. During the conversion process, many things had to change to support the new AuthComponent.

No more automatic username/password field detection

Previously AutoLogin would detect the custom name of your username and password fields by accessing Auth::$fields. Since that property has been removed in favor of Auth::$authenticate, the AutoLogin component received a new property called $fields which mimicked what the Auth's version did. I didn't want to magically guess what the username and password is from Auth::$authenticate and be wrong, so I made it an optional property (you should only need to change it if you are using custom fields).

$this->AutoLogin->fields = array('username' => 'user', 'password' => 'pass');

Seeing as how that was the only major change that may require backwards support, the following minor changes have also occurred: CakeRequest has been implemented anywhere $params were being referenced, the user model is detected via Auth::$authenticate (all first, then Form) in place of the deprecated Auth::$userModel and cookie support has been implemented for localhost environments (may not work in all environments).

If you have any questions, or run into any problems, let me know!