Re: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread gwoo
you can do most of this without any other helpers or changes to the core code. function beforeValidate() { $this-invalidate('username_taken'); return false ; } the in your view $html-tagErrorMsg('User/username_taken', 'This username is already taken. Please choose another');

Re: Problems w/ Graham Bird's Task List Tutorial

2006-06-13 Thread najjannaj
I had the Same Problem, you must replace: new Ajax.Updater(\'tasks_done\',\'/tasks/done/' . with new Ajax.Updater(\'tasks_done\',\'/CAKE/tasks/done/' . This should be the correct path for your Install. Test it! Greetz najjannaj --~--~-~--~~~---~--~~ You received

RE: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread Ryan Ginstrom
[mailto:[EMAIL PROTECTED] On Behalf Of RosSoft invalidate() sets a row in an array with a value of 1. Change invalidate() to set the string as value (then the errors will be available in your controller and helpers) Nice. So I could override invalidate in app_model: /* +++ */ function

Re: Problems w/ Graham Bird's Task List Tutorial

2006-06-13 Thread olle
FYI: Graham's been notified of this URL trouble. My fix for the conundrum was to wrap /tasks/done/ in Cake's $html-url() method, to get a full URL to it. I emailed him this, he answered he'd include that solution, and that fix will probably be in the tutorial forthwith. Hope you have fun with

RE: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread Ryan Ginstrom
[mailto:[EMAIL PROTECTED] On Behalf Of gwoo you can do most of this without any other helpers or changes to the core code. function beforeValidate() { $this-invalidate('username_taken'); return false ; } the in your view $html-tagErrorMsg('User/username_taken', 'This

Re: How optimize application?

2006-06-13 Thread kiniu
[EMAIL PROTECTED] wrote: with debug set to zero doesn't CakePHP cache the model views for 24 hours at a time? So, once you went live it is going to cache the model for 24 hours at a time. And if you don't need those models then why are you making associations for them? If you are

Re: New JavaScript Features

2006-06-13 Thread Jeroen Janssen
Sjeezz... I was just talking about this five minutes ago with a friend and he pointed to this posting... guess I have to update to the latest CakePHP stuff and do some experimenting :) Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you

testing controller with simpletest

2006-06-13 Thread rinda
I am managed to do simple testing ( monkey singularization ). http://wiki.cakephp.org/tutorials:testing_cake_apps But how do I test controller? This is my controller: class HomeController extends AppController { var $helpers = array('Javascript'); var $components = array('Page'); var

$ajaxOptions (updateElement, afterUpdateElement) for autocomplete

2006-06-13 Thread [EMAIL PROTECTED]
I've been triying to include some parameters in the Ajax helper from cake, I thought by just adding the (updateElement, afterUpdateElement) in the array $ajaxOptions you could make these parameters work but they don't, I dont't know what Iam doing wrong I have revised the ajax helper script and I

Re: How optimize application?

2006-06-13 Thread Chris Cassell
And you are right with bindModel function. When I removed hasAndBelongsToMany association from one of my model and binded it in action function del() $model-del() function didn't remove associations from DB. I've been in a similar situation. I'm building an app that has around 30 models and

Re: $ajaxOptions (updateElement, afterUpdateElement) for autocomplete

2006-06-13 Thread nate
http://manual.cakephp.org/chapter/9 Read the Ajax section. These are the keys supported by AjaxHelper. If there are additional keys that aren't supported that should be, you can open an enhancement ticket at https://trac.cakephp.org/ --~--~-~--~~~---~--~~ You

Re: Zend's Devzone Article about Baking Day

2006-06-13 Thread John David Anderson (_psychic_)
Hmmm When the IRC channel first opened, there was a CalE that hung around quite a bit. Makes me wonder if we've got friends at Zend now. Anyone else remember him? Everyone make sure and register for the event! -- John On Jun 13, 2006, at 6:36 AM, Gustavo Carreno wrote: Hey

Re: Zend's Devzone Article about Baking Day

2006-06-13 Thread Gustavo Carreno
On 6/13/06, Armando Sosa [EMAIL PROTECTED] wrote: Thanks Gustavo If anybody has sponsor ideas please tell me. It's harder than I initially tought mostly because my poor english abilities. So if there's somebody with good PR skills who want to help me on that, please tell. I've sent you a

One view Including other views

2006-06-13 Thread Gonçalo Marrafa
Hi. Is there a way of including other views, inside a given view? The idea is similar to elements but, instead of being global, they would be elements valid only for one controller's views. I'm asking you this because i was just trying the AJAX task list tutorial

Where do I put custom validators?

2006-06-13 Thread brandags
In cake/libs/validators.php there are four regular expressions for validators. I would love to add to this list, but know I'm not supposed to touch anything in the cake folder. How do I add more global validator regular expressions to my app? Thanks, Brandon

Re: custom session name

2006-06-13 Thread [EMAIL PROTECTED]
What I am trying to do is the following: I have a simple authentication system in place for a site that can't change. I must use PHP sessions named in a specific way. I was using cakephp to build one section of the application, and would like it to recognize the pre-existing session name. The

Re: Zend's Devzone Article about Baking Day

2006-06-13 Thread Armando Sosa
If you are already registered on del.icio.us, everything you need to is clicking on this link: http://del.icio.us/post?url="">and help push bakingday to the del.icio.us/popular (it was there last week, for a few minutes) On 6/13/06, Gustavo Carreno [EMAIL PROTECTED] wrote: Hey guys / galsStatus

Can't set checkbox checked

2006-06-13 Thread mutabor
Hi all! Firstly - I am completely newbie in Cake. My problem is - in edit mode in my admin side I need to set checkbox for is_track field [TINYINT(1)] checked and have no idea how to do it. The way I am trying to do it: VIEW: ?=$html-checkbox('Download/is_track', null, array('value' =1,

Re: Where do I put custom validators?

2006-06-13 Thread AD7six
Hi Brandon, A good place is probably your app/config/bootstrap.php file. It will always be empty (I think) so you can safely leave it in place when you upgrade cake without worrying that you are missing a new constant/feature needed for the Cake core. Cheers, AD7six

pages controller and setting a different layout

2006-06-13 Thread [EMAIL PROTECTED]
Hi I searched on Groups and asked to no avail on IRC. So now asking here! I have a bunch of static pages for my app, so am very happy using the pages controller to display these, it works well. But for some pages I needed to set a diff layout. I couldnt easily see how to extend PagesController

Re: Zend's Devzone Article about Baking Day

2006-06-13 Thread CalE
John David Anderson (_psychic_) wrote: Hmmm When the IRC channel first opened, there was a CalE that hung around quite a bit. Makes me wonder if we've got friends at Zend now. Anyone else remember him? John, Yep, same one. Back then I was Director of IT for Jupiter Hosting and we were

Re: Auditing database actions

2006-06-13 Thread Russell
I think you could do this by overriding the save function. 1. If you haven't already, make a copy of the cake/app_model.php and put it in your app folder. 2. Copy the save function from model_php5.php or model_php4.php and paste in into app_model.php in your app folder. 3. In the newly pasted

Re: Zend's Devzone Article about Baking Day

2006-06-13 Thread John David Anderson
On Jun 13, 2006, at 10:28 AM, CalE wrote: Yep, same one. Back then I was Director of IT for Jupiter Hosting and we were considering CakePHP for a large development project. (I'm not sure what they eventually chose) I've since moved on and am now working at Zend. I still follow Cake closely

Re: How to with layout/templates?

2006-06-13 Thread yusuf
yes, i was trying to get at themeing. thanks. John Zimmerman [gmail] wrote: Chris Kausel created a class called Icing which I have not tried but I believe is trying to address some of the concerns that you have. You can view the code at

Re: Zend's Devzone Article about Baking Day

2006-06-13 Thread Gustavo Carreno
On 6/13/06, CalE [EMAIL PROTECTED] wrote: Yep, same one. Back then I was Director of IT for Jupiter Hosting and we were considering CakePHP for a large development project. (I'm not sure what they eventually chose) I've since moved on and am now working at Zend. I still follow Cake closely

Re: How optimize application?

2006-06-13 Thread [EMAIL PROTECTED]
This may help too - I sort of accidentally stumbled on to this method while I was working on a project with this thread in mind: ?php class User extends AppModel { var $name = 'User'; function bindComment ($conditions = null, $order = 'created DESC', $limit = null, $page =

hasmany saves and validations

2006-06-13 Thread [EMAIL PROTECTED]
Another newbie question: can some one point me to a tutorial or explain how to validate an 'add' method that would simultaneously add records to two related tables? basically, there is a ticket field and each ticket hasmany comments. conversely each comment belongsto only one ticket. in order to

Re: custom session name

2006-06-13 Thread AD7six
I think you should maybe read what that constant is for before effectively deleting it ;) http://manual.cakephp.org/chapter/4 Possibly (as I also don´t know what you are wanting to do) you want to change CAKE_SESSION_COOKIE or CAKE_SESSION_STRING. Cheers, AD7six

Re: Where do I put custom validators?

2006-06-13 Thread brandags
Thanks! That works great. --~--~-~--~~~---~--~~ 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

Re: hasmany saves and validations

2006-06-13 Thread [EMAIL PROTECTED]
$this-ModelA-save('ModelA' = $data['ModelA'],true); $this-ModelB-save('ModelB' = $data['ModelB'],true); As far as I know no other way around the save and double validation. If there was a CakePHP cascade option I am sure it would just be a shortcut to writing these two lines. And then that

Re: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread gwoo
I prefer to have my messages in the 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@googlegroups.com To unsubscribe from this group, send email to

first site

2006-06-13 Thread Russ
what i am doing now is creating structure of site ie: (home, contact, faq's, submit, contact,) now imf trying to write fuctions here is what i have so far all the pages will have data on it eventually but right now i want to render just the html. how would i do it? im confused, do i have to

Re: Can't set checkbox checked

2006-06-13 Thread mutabor
[EMAIL PROTECTED] wrote: http://api.cakephp.org/html_8php-source.html#l00259 Looking at the API and the corresponding code. Looks like that if you pass 'value' = 'checked' that would do it. Thank you for reply. But 'value' = 'checked' also does not work. I looked through API : 00260

Re: Can't set checkbox checked

2006-06-13 Thread gwoo
you need to specify a checkbox value ?php echo $html-checkbox('Download/is_track',null,array ('value'='1'))? Then in your controller you just set $this-data['Download']['is_track'] in the controller --~--~-~--~~~---~--~~ You received this message because you

Re: Can't set checkbox checked

2006-06-13 Thread mutabor
gwoo wrote: you need to specify a checkbox value ?php echo $html-checkbox('Download/is_track',null,array ('value'='1'))? Then in your controller you just set $this-data['Download']['is_track'] in the controller Thank you gwoo, but ?php echo

Re: Zend's Devzone Article about Baking Day

2006-06-13 Thread CalE
John and Gustavo, John: Good to hear from you - Cake's ACL still has some of your original ideas in it. You need to get those out of there and replace them with some GOOD ideas. :) During a dev meeting today, we talked about it. We'd like to brainstorm up some possibilities for article topics

Re: first site

2006-06-13 Thread AD7six
Hi Russ, It looks like you have the right idea, for any page that doesn't use/need a model set $uses = NULL. That said: I would suggest following this http://manual.cakephp.org/chapter/18 and then asking the questions that remain - you'll find it to be less time overall in terms of developing

Re: Problems w/ Graham Bird's Task List Tutorial

2006-06-13 Thread jeannie109
Thanks, najjanna -- that worked just fine. I tried emailing Graham directly, but did not get an answer. Most things are working ok, accept for on a Refresh, if you click on Job Undone (uncheck one of the completed jobs below) it gives an error message Not Found The requested URL /tasks_done/71

Re: Can't set checkbox checked

2006-06-13 Thread gwoo
paste your controller and view in the cakebin. http://cakephp.org/pastes/add or jump on irc http://irc.cakephp.org we can fix you up. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to

Re: first site

2006-06-13 Thread Russ
i am following that were would the $uses=null go? --~--~-~--~~~---~--~~ 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

GooooooooooooooooaaaaaaaLLLLL

2006-06-13 Thread Fernando
Brazil Hexa gwoo escreveu: paste your controller and view in the cakebin. http://cakephp.org/pastes/add or jump on irc http://irc.cakephp.org we can fix you up. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: first site

2006-06-13 Thread AD7six
Hi Russ, If you follow the tutorial (to the letter) you'll find that a lot of your questions will be answered before you get to them. Re uses, it's better to look and then ask ;)

Re: Can't set checkbox checked

2006-06-13 Thread mutabor
gwoo wrote: paste your controller and view in the cakebin. http://cakephp.org/pastes/add or jump on irc http://irc.cakephp.org we can fix you up. Thank you, I will try. it seems this is my own bug so far ... --~--~-~--~~~---~--~~ You received this

Moving /pages/ to /

2006-06-13 Thread JohnRobert
Before I begin, I'm quite new to cake php (about 2 days using it). So far so good! Before I can fully commit, I need to be able to create static pages under / rather than only under /pages/. I had a go at changing some routes, to no avail! Before we continue, I'd also like to note I want /news/

Re: Moving /pages/ to /

2006-06-13 Thread Felix Geisendörfer
I think I've already created what you are looking for. Good luck with it ; ): http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/ I only use it on my webdesign page (see below), but it seems to work pretty well so far. Best Regards, Felix Geisendörfer aka the_undefined

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Alister Bulman
On 13/06/06, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: Dearly beloved, we are gathered here today to remember a friend. Storm or fair weather, he was there for us. This friend is one we all know: the Wiki. There's a lot of things that link to the wiki. While I agree that there

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread John David Anderson
Don't you worry. Our friend the Wiki is in for a stay in purgatory before he's completely let go. Well be keeping him around until we're sure we haven't missed anything. Don't let that be an excuse for not ticketing things you want to see in the manual, or getting some content ready for the

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Alister Bulman
On 13/06/06, John David Anderson [EMAIL PROTECTED] wrote: Don't you worry. Our friend the Wiki is in for a stay in purgatory before he's completely let go. Well be keeping him around until we're sure we haven't missed anything. But do you intend to actually delete the wiki entirely? Even if

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread gwoo
All the valuable content from the wiki will be transitioned to the Manual or the Bakery. Eventually, the wiki domain will point to the Bakery. The reason is that much of the information on the wiki causes confusion and the Bakery will give us a better place to make sure the content is

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Alister Bulman
On 14/06/06, gwoo [EMAIL PROTECTED] wrote: All the valuable content from the wiki will be transitioned to the Manual or the Bakery. Eventually, the wiki domain will point to the Bakery. The reason is that much of the information on the wiki causes confusion and the Bakery will give us a

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread gwoo
Eventually they will direct you to the bakery where you can search and have a good time with information that is much more relevant, useful, and correct. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Jose Cedeno
Is there a demo or beta site of the Bakery ? I think it would be useful to get some input before the Bakery comes out of the oven.What is going to be the style of the Bakery ? Just articles ? if so how we'll we able to keep track of those ? Will the Bakery allow for user comments or users

Re: first site

2006-06-13 Thread Russ
awsome thanks i was missing it :) my other stupid idiot of the day question is how do i get rid of this? http://localhost/php/index.php/about and make it http://localhost/php/about removing the index.php currently i editted my route dir to remove the default floder it was landing in called

Re: first site

2006-06-13 Thread Russ
ok to make sure i got this i cerated a new controller called it about_controller.php I used this code in it: ?php class aboutController extends AppController { var $name = 'about'; var $uses = NULL; function index() { } } ? pulls up the page fine as this

Re: CakePHP LDAP?

2006-06-13 Thread Levi
Hi Samuel What modifications you made when you implement it in PHP4? I'm very interested with this Model... Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Re: Moving /pages/ to /

2006-06-13 Thread tjquoll
That's pretty cool. I've been playing with a similar idea in a cms I'm building for our main business site. I've been searching the code looking for an alternative to doing the foreach ($paths-controllerPaths as $path) trick to get the controller names but haven't found any otherway yet. To

Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-13 Thread brandags
I've written a form component and helper (http://cakeforge.org/snippet/detail.php?type=packageid=17) that work fine in Windows, but when I upload them to Linux, I get an error. A variable that is being set in the component does not seem to be available in the view, when on Linux. But it works

Re: CakePHP Wiki: In Loving Memory

2006-06-13 Thread [EMAIL PROTECTED]
I'd have been lost the last few weeks without the Wiki. The manual is great but has some way to go before it makes the Wiki truly obsolete. BTW: I appreciate the efforts in getting the docs up to par, it's a big job. thanks --~--~-~--~~~---~--~~ You received

Re: CakePHP LDAP?

2006-06-13 Thread Levi
ok thanks samuel --~--~-~--~~~---~--~~ 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

Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-13 Thread Grant Cox
As you say, the problem will probably be case sensitivity - which is a filesystem issue. So, ensure that the file names have the same case as what you are including - from what you've posted above your helper and component should be Myform.php (capital M), as this is what you have in your