Archive for the ‘CakePHP’ Category

November 1, 2007 6

3 Hidden CakePHP Functions You Can’t Live Without, Flay

CakePHP

CakePHP’s fattie /cake/lib folder holds many hidden treasures, that although documented in Cake’s API, lacks examples of use and simple noobie terms like “howto”. I’m here to help, so settle down.

Read the rest of this entry »


October 29, 2007 15

Easy Dynamic Database Connection in CakePHP

CakePHP

If you’re like me, you’re strikingly handsome you create Cake applications on your computer, then upload them for testing (and usage) to a server. It’s annoying to have to change the /app/config/database.php file for each new testing environment, especially if the same Cake application is being used on multiple machines.

Thankfully there’s a really simple way around this crap.

Read the rest of this entry »


October 23, 2007 37

Image Upload Component (CakePHP)

CakePHP

Thanks to some fine work by Ben Borowski, uploading images in CakePHP is easy as kicking your kids. I’ve used this component for quite a few projects. It’s safe to say that it rules.

Learn how to use it, love it, code it.

Read the rest of this entry »


September 7, 2007 Off

Create Downloadable iCal Events via Cake

CakePHP iCal

iCal just plain rules. Though it’s not a super-detailed, completely all-knowing calendar application, it’s the most user friendly offline event tracker to date. (The best online calendar is Google Calendar, hands down.)

Allowing your loyal, web-savvy fans to download iCal files (enabling them to instantly add events to their iCal program), or subscribing to iCal feeds (allowing their iCal program to update the users calendar whenever they chose – much like RSS) can bring a smile to even the pickiest of web surfers.

Read the rest of this entry »


September 4, 2007 Off

A Useless “Missing Layout” Error

CakePHP

Cake can be a real bitch with errors. Deciphering exactly what went wrong (and in what file) can take way longer than it should. One such example was a blank Missing Layout error I received last week. Upon firing up one of my Cake apps on my server, the following appeared when visiting a particular page:

Missing Layout: You are seeing this error because the layout file can't be found or doesn't exist.

Notice: If you want to customize this error message, create /cat/views/errors/missing_layout.thtml.

Fatal: Confirm you have created the file :

Now normally, the last line above points you to the file it’s trying to find. This is Cake’s way of pointing you in the right direction – a hint, if you will.

Example: Fatal: Confirm you have created the file : \project\app\views\pages\index.thtml.

Cake’s “hint” to me was blank. CakePHP, eat me.

Read the rest of this entry »