Components Components

Twitter Component

By Ivica Munitic
After searching for a suitable php Twitter component for cakephp I found none. So here is my attemp at it. This component implenets all of the twitter api found on http://groups.google.com/group/twitter-development-talk/web/api-documentation
[Read more]

Encrypted Cookie Component

By Jonny Reeves
A Cookie component for Cake PHP 1.1 (which should also work in 1.2 as well). The aim of this component was to make saved data as secure as possible. I have (hopefully) achieved this by utilizing mcrypt (for encrypting and decrypting the data) and checksuming the stored data.

Update: SVN build 385
Cookie's now get stored with their expiration timestamp. When __unpacking() we can check to see if the user has tampered with the cookies expiration time and kill the cookie if they have.

Update: SVN build 387
Fixed constructor and tidied up comments, please note that the use of __construct() relies upon PHP5, but this could easily be adapted for PHP4 if required.
[Read more]

Image Resizer / Crop

By Wendy
A handy-dandy resize, crop component to be used in controllers rather than view.
[Read more]

LastRSS CakePHP Component

By Jimmy
LastRSS is a PHP class for retrieval and parsing of RSS feeds. This is a wrapper to that class making it easy to use in the CakePHP framwork. Much of this component is taken from the work of Matt Curry (http://bakery.cakephp.org/articles/view/simplepie-cakephp-component) and Scott Sansoni (http://cakeforge.org/snippet/detail.php?type=snippet&id=53).
[Read more]

SMS Text Component

By Doug Bromley
Simple component for sending SMS text messages to mobile devices using the Clickatell API (They provide free test accounts).
[Read more]

Authorize.net AIM Integration Component

By Graydon Stoner
A simple component meant to abstract payment processing for Authorize.net's AIM card processing method.
[Read more]

SimpleAcl component tutorial

By unigue
This component follows the traditional way of acl only slightly modifying it. In example there's an inheritance feature, which will help tremendously the access controlling because you don't have to specify every action in aros_acos-table.
[Read more]

DarkAuth - another way...

By Chris Walker
I wrote this initially for Cake 1.1 - basing it on ideas from "obAuth" by Steve Oliveira, but upgraded it to 1.2 rather than using the built in Auth component, mostly because this works how I want it to and, once setup, is really easy to use.

Main Features:

- Per action / per controller / inline access control
- Optional Group support for HABTM and User BelongsTo Group associations
- A "super-user" functionality allowing one group automatic access granted
- Optional tamper-proof Cookie support
- Custom password hashing to suit your Model
[Read more]

Pagination Recall

By Matt Curry
Does it drive you nuts when you edit an item on page 4 of a list, then when you save you're dropped back to page 1 with the list back in the default order? The PaginationRecall component automatically remembers the page you were on and the sorting so you're returned to the same spot on the list.
[Read more]

Yahoo weather component

By Arash Hemmat
Yahoo! developer network provides a RSS based API to access weather information for locations all around the world. The component has a method named get_weather($locationCode,$degreeUnit) that retrieves the weather information for the given location code and outputs the data in an easy to use array. Please read "http://developer.yahoo.com/weather/" for more information about the location code and degree unit. I will provide a tutorial as soon as possible.
[Read more]

Crypter Component

By Christopher E. Franklin
I never could get MySQL's encryption routines to work properly for me so, I created this component to help me out. This is based on the fact that I needed encryption as well as decryption. If you have the same problems and need this type of functionality, feel free to use this.
[Read more]

Want to order your SQL

By Jorge Escribens
If you don't like to have your sqls scattered around your code maybe this component is for you
[Read more]

Modified Preorder Tree Traversal Component

By Michael Patek
A component for retrieving, printing, inserting nodes into, and deleting nodes from trees stored in mptt form.
[Read more]

A Component to help creating SOAP services

By Charles Gunawan
A component providing automatic WSDL generation using jool.nl Webservice Helper library, CakePHP caching of generated WSDL, and automatic handling of SOAP calls.
[Read more]

Ticket Component - i.e. password reset

By Martin Westin
This is my implementation of a simple Ticket Component. A ticket is a way to store a piece of data that can be retrieved and used once. The typical example of this would be a feature to reset user passwords. You need to open that function to a non-secure session. By using a ticket you limit the danger to a more reasonable level. Read on and I will explain...
[Read more]

Model loader

By Huy
This component helps you to load your models on the fly ( I mean in your actions, whenever).
[Read more]

Wizard Component

By jaredhoyt
Automates several aspects of multi-page forms including data persistence, form preparation, wizard resetting (manual and automatic), and wizard navigation (including jumping between steps) while maintaining flexibility with custom validation and completion callbacks.
[Read more]

Tracking navigation history of a user

By Jan Boonen
Many times it can be very useful to track the navigation history of a user. Especially if you want to redirect the user to a page where he came from after some action (e.g. login). With this HistoryComponent, it's extremely easy to handle such actions.
[Read more]

SecureGet Component

By franck
I was searching a simple way to "secure" a bit the links in my cake application. Indeed everyone had this question "what if someone types 'cake/app/user/edit/5' in the browser URL bar ?" ..etc ..
I am not pretending this can replace ACL or more complex implementation, it's just a small component, inspired a bit from the Security component.
[Read more]

ViewInFile component

By franck
Sometimes in needed to output a view in a file. Most of the time for debugging, but also for some web service (xml) where you might need to send (by mail as a copy) an xml file reflecting the answer of the webservice.
[Read more]

obAuth Simple Authentication

By Steve Oliveira
Authenticate your users and secure your controller actions from users belonging to certain groups. Or simply secure your controller actions to let any authenticated user to access it.

How to use: http://bakery.cakephp.org/articles/view/121

Some features:
1. User authentication
2. User groups supported
3. Protect action access with 1 line of code
[Read more]

ecache - easy per user or per anything cache of html or arrays

By alan blount
Caching is basically required for any data-heavy or interaction-heavy site... but you need to be in control of who gets what cache; more specifically, you need to be sure people only get their own cached content.
[Read more]

Image Toolbox Wrapper

By Mason Browne
This is a very simple wrapper for the very-excellent Image_Toolbox class.
[Read more]

AssetPackager for CakePHP

By Brad Daily
Multiple javascript and CSS files simplify things in development, but in production they can begin to adversely affect your page loading times. With AssetPackager for CakePHP, we can have the best of both worlds by allowing multiple files during development and combining and compressing those files for deployment.
[Read more]

Automatic Layout Switcher

By Matt Curry
This component allows you to have two layouts for one site and switches between them automatically based on the domain.
[Read more]

SimplePie CakePHP Component

By Matt Curry
SimplePHP is a PHP class for retrieval and parsing of RSS feeds. This is a wrapper to that class making it easy to use in the CakePHP framwork. Much of this component is taken from the work of Scott Sansoni (http://cakeforge.org/snippet/detail.php?type=snippet&id=53). This is mostly an update so the component works with the lastest version of SimplePie.
[Read more]

Zip Component

By Sean Callan
I am currently building a web 2.0 implementation of Bake that allows users to create their entire application in a friendly web environment and than creates a zip on demand. I wrote this component and have been using it in my development and alpha implementations of the application.
[Read more]

Cake DB Migrations v3.2

By Joel Moss
Cake DB Migrations has now been updated to work with the very latest version of CakePHP 1.2 and the new (hopefully final) console/shells system. I have also added a few extra goodies to make life a little easier.

The new features and changes are as follows:

* You can now specify a column without the need to specify the column type. Type is set to string, which is simply a varchar(255) column.
* Ability to add user definable foreign keys by simply specifying the 'fkey' as a column name, followed by the name(s) of the foreign key(s).
* You can now include PHP code within the YAML migration files

Because the console system in Cake 1.2 has changed a bit, ou now have to place the below script in a slightly different place. Within your main 'vendors' directory above your app and cake core directories, paste the below code into a file called 'migrate.php' and place that file in a directory called 'shells'.

Now just bring up your favourite command line tool and cd into your cake applications root directory and run the following:

./cake migrate

And that is it! That will migrate to the lastest version. You can specify the version like this:

./cake migrate -v 3

As promised, I hope to create a screencast going through all aspects of migrations and how they can save your life.
[Read more]

Captcha component with PhpCaptcha

By Spout
PhpCaptcha is a library for generating visual and audio CAPTCHAs (completely automated public Turing test to tell computers and humans apart).
[Read more]

Request Information Component

By Brian Voss
Need more insight into how a controller structures a CakePHP request? This little component will log important information and variables for each request to your application's debug log.
[Read more]

Using PHPTAL for templates: PhptalView class

By Daniel Kvasnicka jr.
I use PHPTAL quite a lot (believe it or not, I like XML ;) and I wanted to use it in Cake so I wrote a little PhptalView class extending Cake's View.
[Read more]

Notes Task

By Joel Moss
A source-annotations extractor task for bake2.

This allows you to add FIXME, OPTIMIZE, and TODO comments to your source code that can then be extracted in concert with bake2 notes (shows all), bake2 notes fixme, bake2 notes optimize and bake2 notes todo.
[Read more]

othAuth component v0.5.4.5

By Othman ouahbi
the component part of othAuth

changes:
0.5.4.5:
- Fixed a bug that was introduced by lately, missing /
- Fixed a bug ( not really bug but oh well ) preventing othAuth from recovering a session from the cookie data in some situations
0.5.4:
- Fixed a bug in loginAttempts reported by PatDaMilla
- Added support for parameters sent via url in a traditional way, mainly for redirects, thanks to Ritesh.
- Probably some other minor bugs

0.5.3:
- Added compatibility with 1.2 redirections
0.5.2:
- Fixed a bug in getData
- Fixed a bug related to the '/' route
- Added lazy model loading support
- Hmm..maybe something else..eh
0.5.1:
added a minor modification to _passAuthData
[Read more]

Memcache component

By Jiri Kupiainen
A component for using Memcache to cache data from your controllers
[Read more]

PHPMailer with native API for PHP 5.x

By Heiner Gassen
This tutorial on using PHPMailer with Cake (http://bakery.cakephp.org/articles/view/94) has a comment requesting a component that lets you use the native PHPMailer API. This is possible with PHP5's built-in overloading capabilities.
[Read more]

ConfComponent DB based configuration

By Othman ouahbi
DB based configuration, allows you to set and retrieve values organized into conf categories. Now with caching.
[Read more]

SwfUpload and Multipurpose Uploader

By James Revillini
SWFUpload is "a small javascript/flash library to get the best of both worlds - The great upload capability of flash and the accessibility and ease of html/css." The SwfUploadComponent is a piece of code that you can drop into your components directory and immediately integrate with your controllers to handle uploads from SWFUpload or even from a generic HTML form.
[Read more]

phpThumb Component

By Nate Constant
This is my first attempt at writing a component for CakePHP. If you have any suggestions please add them to the comments and I'll incorporate them.
[Read more]

Yahoo Geo Coding Component

By Jim Rubenstein
I've been looking around the Bakery, and I noticed that there was at least one Google Geo Coding Component, and no Yahoo equivilants. I can't speak as to what the difference is, but I wrote a Yahoo Geo Coding component, which is very simple to use. All you do is plug it in, and start baking.
[Read more]

Google Geocoder

By Sohaib Muneer
This is a wonderful component that will retrieve the latitude and longitude of any given address.
[Read more]

RBAuth (a spinoff from othAuth)

By vu nguyen
I want to say thanks to othman ouahbi for his wonderful Authentication Component, this subversion is just a spin-off of othAuth.
I also need to give a big WARNING:
+ This component is still under heavy development
+ I'm not an expert coder, nor do I have that much experience with Cake in general. The code is still messy, and sometimes hard-coded.
The above warning is also one of the main reason I want to post this here, I want to receive as many feedbacks from you guys as possible to improve this Component!

[Read more]

Integrate CakePHP with Kcaptcha

By Andrew Stephanoff
Simple way to integrate CakePHP with Kcaptcha.
[Read more]

SwiftMailer Component

By Othman ouahbi
This is a component that does encapsulate but not hide swift mailer.
In addition, it adds some nifty features.
In short, this is just a delicious cake-ish swift Mailer.
[Read more]

GoogleGeo Component

By Mahmoud Lababidi
For simple GeoCoding and simple results grab this component to make your life just that much easier.
The non-component class is located at http://bearsontherun.com/googlegeo, which can be used as a vendor.
[Read more]

Maxlength using Database Field Lengths

By Brett ODonnell
I wanted to have a maxlength="something" in my forms, but I needed the value to come from the database at least during development. When it goes live the data will cache so it will still be fast.
[Read more]

PayPal Direct Payment API Component

By Mariano Iglesias
Useful component that provides a wrapper for PayPal's Direct Payment API, allowing any cake based application to accept payments via Direct Payment (processing credit cards and payments without leaving your website) and Express Checkout (allowing users to use their PayPal account to pay)
[Read more]

dAuth v0.3 component

By Dieter Plaetinck
the component for dAuth v0.3
[Read more]

Report Creator Component

By Gene Kelly
Under most circumstances web-based intranet applications call for some type of flexible
reporting for its users. Report design is often times a fixed process which immobilizes
a user's ability to create new reports on the fly. Utilizing some existing ingredients
within Cake I managed to bake a fairly straightforward reporting component that can easily
integrate into any Cake application.
[Read more]

Brute Force Protection

By Arvid Picciani
This component is meant to protect you against brute force attacks on forms (and other types of requests).
[Read more]

Basic Fallback Component

By Ludge
This is some basic code showing how to capture a missing action error from a component and call a default action defined in the controller.
[Read more]

Greater Control with Webservices Component

By Erik
Achieving better control over the Webservices feature provided by the core of CakePHP.
[Read more]

Pagination Component

By Andy Dawson
The pagination component. For instruction on use see: http://bakery.cakephp.org/articles/view/65
[Read more]

Tag Cloud

By tompouce bezehon
Here's a nice way to do a simple and customizable tag cloud.
[Read more]

Ajax Validation Component

By Garth Braithwaite
This component adds a few validation options to the already wonderful CakePHP form validation. These features include:
Confirm - Checks two or more fields to make sure they are an exact match (designed for password creation).
Unique - Checks to make sure that a field is not already present in the database (ie email, username, etc).
More output options - There are three output options - unordered list in a div tag of your choice, a JavaScript alert, or just the array to do what you want with it.
Error Class - It has the option to change the CSS class of the label tags for the invalid fields.

The component uses Ajax to be able to validate without refreshing the page. It also relies heavily on the "Standard" CakePHP naming conventions for easier integration.
[Read more]

Simple Tagging Component

By Ben Milleare
This is a quick and easy tagging component that allows you to handle text field, comma-separated input.
[Read more]

Autocomplete

By gwoo
The AutocompleteComponent originally submitted by Nate to CakeForge. With a nice intro at
http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/
The full component and some sample controller and view code is here.
[Read more]

HTTP Client class

By Miguel Ros
Http Client Class
Uses Pear or Curl for a HTTP/HTTPS GET/POST request. Handles cookies and HTTP auth test
[Read more]

Integrating Pear Pager

By Heiner Gassen
PEAR (http://pear.php.net) has a decent Pager class that is easy to integrate in Cake.
[Read more]