drayen's Profile
Recent Articles
Validation in another controller
Published by drayen on 17/8/07You 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 ...

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 :)
$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.
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.
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
$string = preg_replace('/[^\p{Ll}0-9_]/u', $settings['separator'], $string);