drayen's Profile

Recent Articles

Validation in another controller

Published by drayen on 17/8/07

You have 2 controllers, posts and comments, you want to be able to have a form on a posts view which submits to the comments controller, which does its thing then redirect to referrer - easy! BUT you also want the validation errors (if any) to dis...

Sending Email With PHPMailer

Published by drayen on 11/10/06

[This is a slightly updated copy of the tutorial on now defunct wiki.cakephp.org] This example will show you how to send HTML mail from you Cake application with PHPMailer. You will create: 1. cakePHP component 2. a vendor package ...

Recent Comments

drayen posted on 09/05/07 02:00:04 AM
Nice solution jaredhoyt,

But what if you have say posts and files, both of which have comments - then you run into trouble (i used a similar method to you until i hit this problem). This solution gets around that problem and more :)

drayen posted on 08/22/07 04:38:43 PM

$string = preg_replace('/[^p{L}0-9_]/u', $settings['separator'], $string);

taken from : http://www.regular-expressions.info/unicode.html
I'm no regex guru so YUMV, if the above didn't work but you get it working, please post here.
drayen posted on 07/30/07 01:25:51 AM
+1 on the ANT / SVN / FTP deployment script.

I've been playing with (unsuccessfully so far) is integrating Eclipse with Trac, might be worth looking into!

I've also been playing with the templates for code completion, very handy for generating the larger phpdoc comments (like the ones at the top of each object).

IMHO this tutorial is well overdue.
drayen posted on 07/18/07 03:02:04 AM
Updated and slightly cleaner code

http://bin.cakephp.org/saved/21922
Watermarking would now be easy, look @ #6 and #7 on http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php
drayen posted on 07/14/07 01:56:06 PM
Currently the slug generation will strip out any non ascii chars w.g. accented chars, to allow them to be used, change line ~119 to

$string = preg_replace('/[^\p{Ll}0-9_]/u', $settings['separator'], $string);