Useful hidden functions

0

There are some handy cake functions you might not have used or even heard of, yet. Debugging Most beginners use print_r() to debug variables. Without <pre> tags its really hard to read, though. Use pr($var) or debug($var) to debug this…

Development vs. Productive Setup

6

If you want to deploy your cakephp app you usually have to change a few lines of code. But we want to minimize that. My example setup: development: Windows (>= Vista) productive: Linux (Debian) Database Setup Create a library file…

Extended core validation rules

2

I18n Translation Some translate the rules in the view – but it usually creates redundancy. In some projects this might be intentional. I like to keep the error messages centralized, though. For that, you can just override the core translation…

User Add Console Script

0

If you have a fresh setup of your app and no users in the database, its not easy to "register" a new one (with the admin role and everything). The other case would be if you changed the security salt….

Code-Completion Console Script

3

Many good IDEs for Webdevelopment cannot automatically understand the structure of a framework and its classes/objects. They need a small file initializing the objects so that they know in which context they appear. E.g.: $this->Session (Session Helper) its impossible for…

Helper? Component? Lib?

0

Some ideas what to use if you want to add some additional feature. Feel free to comment on this below. Level of Independence We need to ask ourselves if this feature needs to interact with other cake elements, like controller,…

Tools Plugin – Part1: Token

0

In this first part of the presentation of my tools plugin I will show you how you can easily manage (store, retrieve, validate) "code keys" alias "tokens". They are useful in the registration process of users, or if you want…