Re: SwiftMailer Component

2007-04-05 Thread Aidan Lister
Hi Anthony, I found it a lot easier just to use Swift as a vendor package. Place it in your vendor folder, call your $this->render inside an output buffer, and pass this to Swift. It's not ideal, but I found it a lot easier to use than the components floating around. set('event', $event); $thi

WithCake.com ideas (Was Re: WithCake.com relaunched)

2007-04-05 Thread R. Rajesh Jeba Anbiah
On Apr 5, 10:58 pm, "jonathan.snook" <[EMAIL PROTECTED]> wrote: > On Mar 24, 4:52 pm, "jonathan.snook" <[EMAIL PROTECTED]> wrote: > > > There's still two main features that I need to add: > > 1) RSS feeds for the job listing > > 2) a way for people to contact you through the site > > Both of these

Re: new auth component in cake 1.2

2007-04-05 Thread R. Rajesh Jeba Anbiah
On Apr 6, 1:38 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > how can i find manual, trytourial about new auth coponent+acl in cake > > 1.2 ? > > I guess you could write it ;) I am not sure there is anything out there yet. There

Re: Two Applications sharing Models

2007-04-05 Thread Felix Geisendörfer
If both apps are running on the same machine which I assume, you should be able to simply put the Models in one application and then go to /app/config/bootstrap.php and create a: $modelPaths = array('full path to models', 'second full path to models', 'etc...');* *array where you add the full

Re: how to verify cache is working properly

2007-04-05 Thread bingo
hi Tane, Thanks for informing me about that. I didn't know that... Cache although seems simple with CakePHP, there is no good tutorial that covers all this points in one place. I am struggling to use get caching machanism work properly.. Regards, bingo On Apr 5, 1:56 pm, "digital spaghetti" <[

Re: How to execute OthAuth protected actions with a CRON job?

2007-04-05 Thread CraZyLeGs
Hi, well, requestAction() goes through the whole pipe and auth is in there. if the action protected is in the same controller then do $this- >myaction() instead of requestAction. If however it's in another controller then it's problematic. You can do something though: you need to disable auto red

Re: Ajax validate effect

2007-04-05 Thread pixelclub
thanks Christopher, i'm going to give that a try. I was wondering if its possible to retrieve a list of input fields that don't validate and pass these to a javascript function from within the controller. This way i can apply an effect to all of these using scriptaculous. This will be executed a

Re: Choice of Version

2007-04-05 Thread Joshua Benner
Integration with Drupal is on the list of desired features, but if it does not work, it's not a show-stopper (I'll just have to write an application wrapper that handles ldap login, authorization, etc). As such, do I understand correctly that I should be able to develop a CakePHP application separ

Re: Two Applications sharing Models

2007-04-05 Thread rtconner
Hm... maybe. I develop on windows machine. But qa/production are done on linux. I did some searching at your prompting, I guess there is a utility called linkd which emulates symlinks on widows. I gotta find it and get it running. We'll see. The SVN thing.. hm.. gotta figure this out. Because th

Re: Two Applications sharing Models

2007-04-05 Thread John David Anderson (_psychic_)
On Apr 5, 2007, at 4:14 PM, rtconner wrote: > > Is there a way to have two applications share a Model, and possibly > some componants and helpers also? > > I realize in general most applications will have different data sets > and sharing Models will make no sense at all. However if you use the

Some Fresh Cake

2007-04-05 Thread Larry E. Masters aka PhpNut
We put together a new bug fix release for 1.1.x.x stable branch, so download[1] version 1.1.14.4797 Have a look at the change log[2] to see what has been updated and fixed. We have also been working hard to get all the features into 1.2.x.x branch. We are not quite there yet, so we have another 1.

Two Applications sharing Models

2007-04-05 Thread rtconner
Is there a way to have two applications share a Model, and possibly some componants and helpers also? I realize in general most applications will have different data sets and sharing Models will make no sense at all. However if you use the same model twice with two different database configs, now

Re: new auth component in cake 1.2

2007-04-05 Thread Digital Spaghetti
If your looking for a Auth component, consider othAuth (http:// bakery.cakephp.org/articles/view/99). The documentation is good (http://bakery.cakephp.org/articles/view/148) and very easy to drop into your project. The notes indicate that it will later support CakePHP's own ACL component, but in

RE: Choice of Version

2007-04-05 Thread Mariano Iglesias
Drake is supposed to support 1.2. I tried it with latest SVN available at the time of release and was working perfectly. Need to try it with latest SVN, though, but I don't foresee any issues other that already known issues: http://dev.sypad.com/projects/drake/documentation/known-issues/ Regardi

Re: find session entries / force session _gc / (de)serialization

2007-04-05 Thread Chris Hartjes
On 4/5/07, jyrgen <[EMAIL PROTECTED]> wrote: > > should read "de"serialized data, sorry. let me try to explain: > > after successful login i write a status value "logged_in" = 1 > into the session. this helps granting access to certain actions. > Users should be allowed to log in only *once*. so d

RE: Best Practice with Behaviors or How To Make a Model Act As...

2007-04-05 Thread Mariano Iglesias
Here you have some built in behaviors: https://svn.cakephp.org/repo/branches/1.2.x.x/cake/libs/model/behaviors/ More may be added in the future, but remember, Cake is not a package of useful classes, it's a framework. While some behaviors that are very common to different kind of applications ma

Re: find session entries / force session _gc / (de)serialization

2007-04-05 Thread jyrgen
> > 1) i need to find arbitrary session entries in the db, > > or better: retrieve a row with a particular serialized > > value of data. > > I'm curious as to what you're trying to accomplish by doing this? should read "de"serialized data, sorry. let me try to explain: after successful login i w

Re: Best Practice with Behaviors or How To Make a Model Act As...

2007-04-05 Thread BlenderStyle
Oops. That broken link should be: http://groups.google.com/group/cake-php/browse_thread/thread/683cdd4820eb2c03/df729d09968eaf7d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gro

Re: Struggling greatly with validation

2007-04-05 Thread Michael Tuzi
Well, I finally figured out my problem. You told me to $this->Model- >set($this->data), but I missed off the model. What a maroon!!! I just upgraded my IDE and was stepping through the code. I couldn't figure out how the model got the data from the controller. Now I do. Anyway, I asked before abou

Best Practice with Behaviors or How To Make a Model Act As...

2007-04-05 Thread BlenderStyle
The concept of behaviors is a new one to me. I understand that views have helpers, controllers have components, and models have behaviors, but I still don't grasp how to use these correctly. So, I did some research: cake/libs/model/model.php cake/libs/model/behavior.php Various Google Group posts

Re: find session entries / force session _gc / (de)serialization

2007-04-05 Thread Chris Hartjes
On 4/5/07, jyrgen <[EMAIL PROTECTED]> wrote: > > my auth system is more or less selfmade. i dig the session component > very much, but need more control in my controllers (!) over the > content > of the session table. > > 1) i need to find arbitrary session entries in the db, > or better: retrieve

find session entries / force session _gc / (de)serialization

2007-04-05 Thread jyrgen
my auth system is more or less selfmade. i dig the session component very much, but need more control in my controllers (!) over the content of the session table. 1) i need to find arbitrary session entries in the db, or better: retrieve a row with a particular serialized value of data. do i nee

Re: new auth component in cake 1.2

2007-04-05 Thread John David Anderson (_psychic_)
On Apr 5, 2007, at 2:38 PM, Samuel DeVore wrote: > > On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: >> >> how can i find manual, trytourial about new auth coponent+acl in >> cake >> 1.2 ? >> > > I guess you could write it ;) I am not sure there is anything out > there yet. An

Re: new auth component in cake 1.2

2007-04-05 Thread Samuel DeVore
On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > how can i find manual, trytourial about new auth coponent+acl in cake > 1.2 ? > I guess you could write it ;) I am not sure there is anything out there yet. --~--~-~--~~~---~--~~ You received this messa

new auth component in cake 1.2

2007-04-05 Thread [EMAIL PROTECTED]
how can i find manual, trytourial about new auth coponent+acl in cake 1.2 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubs

Re: Choice of Version

2007-04-05 Thread Joshua Benner
Mariano, Does Drake work with 1.2, and is Drake a usable platform for writing internal applications? (our intranet runs on drupal 5.1) On Apr 5, 10:55 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Yes bakery runs on 1.2 > > And if you are confortable with an Alpha release, PLEASE OH PLEASE

SwiftMailer Component

2007-04-05 Thread Anthony
Hi, I'm using the SwiftMailer Component for CakePHP found here: http://bakery.cakephp.org/articles/view/193 However, the newest version of SwiftMailer is 3, while the component is designed for 2 and no longer works "out of the box". Is there a version out there for version 3? Or does anybody know

Re: /app/webroot access & css.php

2007-04-05 Thread joe
AD, What do you mean dev-style install? Yes, the static files are in the webroot folder, but my question is why it's doing an explicit redirect? I can access anything in the webroot folder from "/" directly, but leaving out the trailing slash changes the URL to prepend "/app/webroot/" My debug

Re: WithCake.com relaunched

2007-04-05 Thread jonathan.snook
On Mar 24, 4:52 pm, "jonathan.snook" <[EMAIL PROTECTED]> wrote: > There's still two main features that I need to add: > 1) RSS feeds for the job listing > 2) a way for people to contact you through the site Both of these are now in. At this point, the site is essentially "feature complete" althou

Re: how to verify cache is working properly

2007-04-05 Thread digital spaghetti
I only found out this method today, but found it to work perfectly. Put the code you wish to cache in an element, and when you want to render the element use this: element('element', array('cache'=>'1 day'));?> Now the element will be cached for 24 hours from generation. Beware though, if you u

Re: How can I call Element from another Element?

2007-04-05 Thread Sam Sherlock
Well I have been able to place elements from within elements using the default.ctp $this->renderElement('header'); in header.ctp $this->renderElement('nav') header & nav are elements using cakephp 1.2 On 05/04/07, jinhr <[EMAIL PROTECTED]> wrote: > > > Anybody have idea how can I

Re: sessions in database

2007-04-05 Thread majna
or $result = eval("return \$_SESSION;"); pr($result); On Apr 4, 11:49 am, "jyrgen" <[EMAIL PROTECTED]> wrote: > here's a solution i found on php.net. > > it's definitely not smart, but works ok. > > $temp = mysql_query('SELECT * FROM sessions'); > while ($row = mysql_fetch_array($temp)){ >

How can I call Element from another Element?

2007-04-05 Thread jinhr
Anybody have idea how can I make my element /views/elements/navigation.ctp to include other elements: /views/elements/searchbox.ctp /views/elements/calendar.ctp ? Thanks ahead. Henry @ Toronto. --~--~-~--~~~---~--~~ You received this message because you are sub

Discussion on cake-apps-sites-in-the-wild

2007-04-05 Thread savagekabbage
I have created a new interactive site almost emulating a flash enviroment. Please let me know what you think, visit: www.letterwars.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to t

Re: images -> prev, next

2007-04-05 Thread Copot
Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more optio

Re: Struggling greatly with validation

2007-04-05 Thread Michael Tuzi
I'm using CakePHP 1.1 and my call from the controller is: if($this->Model->create() && $this->Model->validates($this->data)) I have also tried: if($this->Model->create($this->data) && $this->Model->validates()) if($this->Model->validates()) And when I use this in my model: function beforeVa

Re: DreamHost and CakePHP?

2007-04-05 Thread neospirit
Oops. I've found http://groups.google.com/group/cake-php/browse_thread/thread/306ba0d11463663 e/533102f4a1cc0d09?lnk=gst&q=DreamHost&rnum=1#533102f4a1cc0d09 about DreamHost and CakePHP. Still, if anyone like to share what's the "current situation" of CakePHP based site and DreamHost, please do.

Re: Ajax validate effect

2007-04-05 Thread Christopher E. Franklin, Sr.
If you're using $ajax->observeField, you can add custom javascript to your loaded option in the array. ie. $ajax->observeField(,array('loaded' => 'document.getElementById('div_name').style.background-color = "yellow"; document.getElementById)); You get the idea. Write some javascript in

Re: Strange app_controller problem

2007-04-05 Thread [EMAIL PROTECTED]
That did the trick :) Thanks alot! On 5 apr, 17:30, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Could be because I also use a beforeRender() in the each > > > of my controllers? > > Probably try > > parent::beforeRender(); at the end of t

Re: Strange app_controller problem

2007-04-05 Thread Samuel DeVore
On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Could be because I also use a beforeRender() in the each > of my controllers? Probably try parent::beforeRender(); at the end of those functions in your beforeRender() in the other controllers http://us2.php.net/manual/en/keyword.parent.ph

Re: problem when i include javascript files

2007-04-05 Thread John David Anderson (_psychic_)
On Apr 5, 2007, at 9:17 AM, Dia wrote: > > is it possible to do : > > // AppController : > $components = array(a, b, c); > > // ThingsController > $components[] = c; Have you tried it, and if so, what happened? ;o) -- John --~--~-~--~~~---~--~~ You received th

Re: problem when i include javascript files

2007-04-05 Thread Dia
sorry, $controller[] = d; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECT

Re: problem when i include javascript files

2007-04-05 Thread Dia
you mean if I have var $helpers = array('Html', 'Form', 'Javascript'); in app/app_controller.php and var $helper= array('Text'); in xxxsController only Text helper will be available in xxxsController ? (sorry for just "reformulation-question" but sometimes have troubles with English :p) is it

Re: problem when i include javascript files

2007-04-05 Thread Dia
is it possible to do : // AppController : $components = array(a, b, c); // ThingsController $components[] = c; ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Strange app_controller problem

2007-04-05 Thread [EMAIL PROTECTED]
I have some code which needs to be executed on every page (it's a latest headlines block in the layout), so I decided to put the code to get the data in app/app_controller.php: function beforeRender() { if (isset($this->News)) { $this->set('Layout_news, $this->News->findAll("online =

Re: images -> prev, next

2007-04-05 Thread digital spaghetti
You should not need to do e($html->image('prev.gif') Instead, try it like this: prev($html->image('prev.gif'), null, null)); ?> next($html->image('next.gif'), null, null)); ?> On 4/5/07, Copot <[EMAIL PROTECTED]> wrote: > > When I do something like this, > > prev(e($html->image('prev.gif')), n

Re: Choice of Version

2007-04-05 Thread Samuel DeVore
Also the best way to make this a great release is for people to actually use it and kick the tire on it, allot! Also if you think you find bugs report them in https://trac.cakephp.org with a patch if you can. As you do thing with it, if its cool (and you will do stuff that is cool, we all think

RE: Choice of Version

2007-04-05 Thread Mariano Iglesias
Yes bakery runs on 1.2 And if you are confortable with an Alpha release, PLEASE OH PLEASE don't give us a message on the google group in about three days saying that there's little documentation. It's an alpha release ;) -MI --

Re: Choice of Version

2007-04-05 Thread Chris Hartjes
On 4/5/07, Joshua Benner <[EMAIL PROTECTED]> wrote: > > Seasoned PHP developer looking to dive into CakePHP for a new project > on organization's intranet. Is 1.2 stable enough for production use, > or should I steer clear until it reaches release? > Don't fear the beta! ;) 1.2 is probably good

Re: Choice of Version

2007-04-05 Thread Samuel DeVore
If you don't mind some shifting api's (which seems to of slowed down a lot) for an internal project just starting up I would use 1.2 it's got some cool stuff coming down the pike. btw the bakery runs 1.2 I believe Sam D On 4/5/07, Joshua Benner <[EMAIL PROTECTED]> wrote: > > Seasoned PHP d

Re: problem when i include javascript files

2007-04-05 Thread Samuel DeVore
Also remember that helpers are not additive, so if you have 'Javascript' in your AppController and you have other stuff in that controller for this page Javascript is gone. On 4/5/07, Dia <[EMAIL PROTECTED]> wrote: > > I think you should add > var $helpers = array('Javascript'); > in the control

Choice of Version

2007-04-05 Thread Joshua Benner
Seasoned PHP developer looking to dive into CakePHP for a new project on organization's intranet. Is 1.2 stable enough for production use, or should I steer clear until it reaches release? --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: DreamHost and CakePHP?

2007-04-05 Thread Samuel DeVore
http://runningshopaz.com http://wingsbirds.com both dreamhost. By the way a simple search of the group would reveal It's not hosted on google groups for the UI ;) On 4/5/07, Erich C. Beyrent <

Re: problem with my cdm

2007-04-05 Thread Samuel DeVore
By thanking people for their future help, are you not expecting a response to this question. I would think cake probably could, but you could take a little more effort in wording your question. How about an example... a bit of a schema, try putting into your question some effort equivalent to wh

Re: How to use a model in views?

2007-04-05 Thread fr3nch13
search this group for 'requestAction' or use the ajax helper. On Apr 5, 6:37 am, "JuniorCMS" <[EMAIL PROTECTED]> wrote: > Hi to all, > > i need to have a view that use a model or a controller method to load > some data like news or other. > > I'm implementing a simple template system for my cake

Re: flash don't redirects the user to the specified $url.

2007-04-05 Thread clemos
what's your DEBUG level ? if it's not 0 (production level), flash() won't redirect automatically. it will only display a link. hope it helps. clément On 4/5/07, Bruno <[EMAIL PROTECTED]> wrote: > > If i code in a controller (generated by bake) > > function delete($id) >

Re: problem when i include javascript files

2007-04-05 Thread Dia
I think you should add var $helpers = array('Javascript'); in the controller corresponding to your view --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php

Re: DreamHost and CakePHP?

2007-04-05 Thread Erich C. Beyrent
I've got a few sites on Dreamhost and had no problems. -Erich- neospirit wrote: > Hi all, > > Anyone here currently host CakePHP site with DreamHost? Any issues on > deploying CakePHP site? > > I'd really appriciate any info shared here. I plan to use their service. > > Regards, > Uwie > >

problem with my cdm

2007-04-05 Thread replikan
Hi ! By doing my CDM, i have to create at least in my DBMS one triple relation. Is CakePHP manage this kind of relation and how ? thanks for your future help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake P

Re: Validation: beforeSave and setting fields

2007-04-05 Thread Tony
Nice. That works perfectly. Thanks, - Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email

flash don't redirects the user to the specified $url.

2007-04-05 Thread Bruno
If i code in a controller (generated by bake) function delete($id) { if ($this->Livre->del($id)) { $this->flash('The Livre with id: '.$id.' has been deleted.', '/ livres'); } } The flash function sho

Helper tutorial/example

2007-04-05 Thread Luca.PESCATORE
Hello, where I can find a good tutorial for Helpers ? Luca --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this gr

Re: DreamHost and CakePHP?

2007-04-05 Thread Humble Groups
I have deployed it without any issues. Probably you have to check the php version compatibility with your components and enable php 4 or 5 accordingly.. On 4/5/07, neospirit <[EMAIL PROTECTED]> wrote: > > Hi all, > > Anyone here currently host CakePHP site with DreamHost? Any issues on > deployin

problem when i include javascript files

2007-04-05 Thread joshi
hello there, When i try to include a external javascript fle in my 'thtml' file echo $javascript->link('rico/rico.js'); it resides in webroot/js/ but iam getting the error Missing controller You are seeing this error because controller JsController could not be found. Notice: If you want to c

How to use a model in views?

2007-04-05 Thread JuniorCMS
Hi to all, i need to have a view that use a model or a controller method to load some data like news or other. I'm implementing a simple template system for my cake blog and my be one template want to load some data like news and other template want to load last read article What to do? Tha

Re: Components not loading

2007-04-05 Thread bit
> I wondered about that but forgot to directly ask/clarify. If you put > code in your app controller that relies on something being present, it > would be a *very good* idea to put what it relies upon in the same > place ;). I won't argue with you on that but I was hoping that I wouldn't have to

Re: How to restrict cakephp to certain sections of your site?

2007-04-05 Thread Dr. Tarique Sani
On 4/5/07, AD7six <[EMAIL PROTECTED]> wrote: > Why add the complexity (I'm sure you have a valid reason)? May be I understood the question wrong but he did not want to put stuff other stuff in webroot and what I describe achieves what he wants Tarique -- ===

Re: Components not loading

2007-04-05 Thread bit
I've don't remember overriding the __construct method and I just double-checked to confirm that. :-P Tried printing out the contents of $this->components and all I got was Session. Next I tried declaring the components array in AppController and see if that changes anything. It did. No more error

DreamHost and CakePHP?

2007-04-05 Thread neospirit
Hi all, Anyone here currently host CakePHP site with DreamHost? Any issues on deploying CakePHP site? I'd really appriciate any info shared here. I plan to use their service. Regards, Uwie --~--~-~--~~~---~--~~ You received this message because you are subscrib

images -> prev, next

2007-04-05 Thread Copot
When I do something like this, prev(e($html->image('prev.gif')), null, null); ?> next(e($html->image('next.gif')), null, null); ?> no links are genereated. It seems to work only with text. Can someone give me an explaination or a solution? --~--~-~--~~~---~--~~

Re: Components not loading

2007-04-05 Thread AD7six
On 5 abr, 11:03, "bit" <[EMAIL PROTECTED]> wrote: > I've don't remember overriding the __construct method and I just > double-checked to confirm that. :-P > > Tried printing out the contents of $this->components and all I got was > Session. Next I tried declaring the components array in AppContr

Re: How to restrict cakephp to certain sections of your site?

2007-04-05 Thread AD7six
Hi BlenderStyle, Unless there is something wrong with your .htaccess files right now the url http://domain.com/subfolder/file.swf woud give you the same result as http://domain.com/app/webroot/subfolder/file.swf . The html helper should be generating you the 1st form (if not check your .htaccess

Firefox error with json.js, cakephp and ajax scriptaculo

2007-04-05 Thread [EMAIL PROTECTED]
Hi, in my application cakephp I have this code (into view): echo $javascript->link('prototype'); echo $javascript->link('scriptaculous.js'); echo $javascript->link('json.js'); ... ... ... $options = array("url"=>"/bufferpoints","complete" => "prove(request)"); echo $ajax

how to verify cache is working properly

2007-04-05 Thread bingo
Hi, I don't have much traffic on my website...but for future, I am starting to implement cache. Its seems to be working...but how do I verify that its properly working... For instance, I set cacheAction only for one action in one controller. But when I check my tmp/cahce, I only found cache for

Re: /app/webroot access & css.php

2007-04-05 Thread AD7six
On 5 abr, 06:58, "joe" <[EMAIL PROTECTED]> wrote: > Hi, I am running version 1.1.12.4205. > > When I access "/files" (w/o the trailing slash), it redirects to "/app/ > webroot/files/". Why is it doing this? If you are using a development style install, it is assumed that everything is in your

Re: Validation: beforeSave and setting fields

2007-04-05 Thread Dia
I had the same problem : wanted to modify datas in beforeValidates and see these changes in the form in validation failed the topic I opened : http://groups.google.com/group/cake-php/browse_thread/thread/7d9a099a72d079c5/599bacad094e8d3c?lnk=gst&q=lost&rnum=1#599bacad094e8d3c this is my explaina

Re: Struggling greatly with validation

2007-04-05 Thread Dia
in your controller : ... $this->MyModel->set($this->data); if ($this->MyModel->validates()) { ... or, if using CakePHP 1.2.x.x : if ($this->MyModel->create($this->data) and $this->MyModel- >validates()) the array shouldn't be empty any more in beforeValidate function --~--~-~--~~-

Re: Dynamic Images

2007-04-05 Thread GreyCells
Create a cache dir in /img (off webroot) then create an ImgController with a cache() function (or a diferently named controller/function and set up a Route). When a file is not found in /img/cache the ImgController->cache function is called where you can create the image and place it in your /img