show field names in cakephp error messages

2009-05-05 Thread Malcolm Krugger
Is it possible to show the fieldname/include the fieldname in cakephp validation error messages ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegr

Re: cakephp auth component password field always empty why ??

2009-04-28 Thread Malcolm Krugger
$this->Auth->userModel = 'Member'; did the trick and of course Hats off to Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To u

Re: cakephp auth component password field always empty why ??

2009-04-28 Thread Malcolm Krugger
Brian Good work indeed We have made good progress DESCRIBE `members` INSERT INTO `members` (`username`, `password`, `firstname`, `lastname`, `emailid`) VALUES ('zfa', 'ssadf', 'd', 'ADa', 'AdsaD') SELECT LAST_INSERT_ID() AS insertID Now the first SELECT statement is gone as you have right

Re: cakephp auth component password field always empty why ??

2009-04-27 Thread Malcolm Krugger
So has anyone experienced the cakephp auth component password field always empty problem at all ?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@goog

Re: cakephp auth component password field always empty why ??

2009-04-26 Thread Malcolm Krugger
$this->Auth->fields = array('password'=>'password1'); Now it says the password1 field is null i.e the same effect happens now also --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gro

Re: cakephp auth component password field always empty why ??

2009-04-24 Thread Malcolm Krugger
I have not set security set hash anywhere Im using the following $this->Auth->userModel = 'Member'; $this->Auth->loginAction = array('controller' => 'members'); $this->Auth->autoRedirect=true; $this->Auth->allow('register'); --~--~-~--~~~

Re: cakephp auth component password field always empty why ??

2009-04-24 Thread Malcolm Krugger
Miles Configure::write('Security.level', 'medium'); /** * A random string used in security hashing methods. */ Configure::write('Security.salt', 'DsssggYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi'); ALSO IN DEBUGGING output 1 DESCRIBE `members` 2 SELECT `member`.`id`, `member`.`u

Re: cakephp auth component password field always empty why ??

2009-04-24 Thread Malcolm Krugger
Ok here is the view create('Member' ,array('controller' => 'Members' , 'action' => 'register')); echo $form->input('Member.username'); echo $form->input('Member.password'); echo $form->input('Member.firstname'); echo $form->input('Member.lastname'); echo $form->input('Member.emailid'); echo $fo

Re: cakephp auth component password field always empty why ??

2009-04-23 Thread Malcolm Krugger
INSERT INTO `Member` (`username`, `password`, `firstname`, `lastname`, `emailid`) VALUES ('user34', NULL, 'sdafas', 'fasfa', 'sfasfas') Yes the password field is null in the SQL too Am I missing any configuration directive ? --~--~-~--~~~---~--~~ You received th

Re: cakephp auth component password field always empty why ??

2009-04-21 Thread Malcolm Krugger
Yes it is correctly written and there are these fields in Mysql id auto_increment username varchar(255) password varchar(255) email varchar(255) I'm using a non standard table/model for authentication other than User and I have used this->Auth->userModel = 'Member' There is no validation in t

cakephp auth component password field always empty why ??

2009-04-21 Thread Malcolm Krugger
Im using Auth component I have the following code in my register/add function if (!empty($this->data)) { pr($this->data); $this->School->set($this->data); if ($this->School->save($this->data)) { print "data saved" } else { print "cannot save data"; } } I always

Re: Can a variable defined in one view file be used in another ?

2009-02-04 Thread Malcolm Krugger
Thanks I have many view files that may use the same variables again and again SO I do not want to define these variables so many times ? Is there a shortcut ? These variables are pure html e.g $veryimp = ""; etc Malcolm On Feb 5, 11:14 am, Miles J wrote: --~--~-~--~~---

checkboxes arrangement

2009-02-04 Thread Malcolm Krugger
Is there an example somewhere I can see where multiple checkboxes are arranged in a html table with say 3 columns ? I'm using the $form->input('choice', array('type'=>'select', 'multiple'=>'checkbox', . Malcolm --~--~-~--~~~---~--~~ You rece

Can a variable defined in one view file be used in another ?

2009-02-04 Thread Malcolm Krugger
Suppose I define a variable in one .ctp file..i.e header.ctp $veryimp and if I renderelement another subheader.ctp file inside the header.ctp file How can I access the value of $veryimp from the new subheader.ctp file ? Is it possible if not what is the workaround to define GLOBAL variables whi

Re: REgarding using Mysql functions like NOW(), CURDATE() etc

2008-11-29 Thread Malcolm Krugger
"On Nov 29, 9:42 pm, the_woodsman <[EMAIL PROTECTED]> wrote: > I don't think Federico has answered your general question about using > MySQL functions," Yes correct. and I would very much like to believe, that cakephp already has some method(s) to harness the power of the multitude of Mysql fu

REgarding using Mysql functions like NOW(), CURDATE() etc

2008-11-29 Thread Malcolm Krugger
I maybe missing the obvious, But can someone please point the right syntax for $this->data['User'] ['status'] = 'temp'; $this->data['User']['signedup'] = 'CURDATE()'; $this->User->save($this->data) The above does not sav

Re: multiple custom error messages for a single validation rule - is it possible ?

2008-11-24 Thread Malcolm Krugger
Yes several rules per field was the way to go But my custom validation would contact a remote server and then display an error message appropriately So I thought I would save on those remote calls if for single validation rule I had the facility for displaying different error messages Also I tr

multiple custom error messages for a single validation rule - is it possible ?

2008-11-23 Thread Malcolm Krugger
Say I have the following rule in my validation array in my Model 'val1' => array( 'rule' => 'val1', 'message' => 'some problem with username' ) Now in function function val1 ($value) { NOw I want to return 3 dif

Re: Warning (2): fopen(cakephp/app/tmp/cache/persistent/cake_core_dir_map) [function.fopen]: failed to open stream: Permission denied [CORE/cake/libs/file.php, line 146]

2008-11-03 Thread Malcolm Krugger
Sorry I should have mentioned earlier I set 777 perms for /app/tmp and all of its subdirectories too already Mal On Nov 2, 7:36 pm, Anupom <[EMAIL PROTECTED]> wrote: > I think you need to set writable permission to the /app/tmp directory and > its subdirectories. > --~--~-~--~~--

Warning (2): fopen(cakephp/app/tmp/cache/persistent/cake_core_dir_map) [function.fopen]: failed to open stream: Permission denied [CORE/cake/libs/file.php, line 146]

2008-11-02 Thread Malcolm Krugger
>From time to time I get the following cakephp error Warning (2): fopen(cakephp/app/tmp/cache/persistent/cake_core_dir_map) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 146] What could possibly be the reason? I'm using the latest cakephp Mal --~--~

Re: Fatal error Call to undefined method Controller Html()

2008-11-01 Thread Malcolm Krugger
$html->link('Activate account', $html- >url(array('controller'=>'users', 'action' => 'activate', $userid), true)); Works like a charm indeed Cheers ! On Oct 31, 6:41 pm, Rafael Bandeira aka rafael --~--~-~--~~~---~--~~ You received this message because you ar

Re: Fatal error Call to undefined method Controller Html()

2008-10-31 Thread Malcolm Krugger
link('Activate account', array('controller'=>'users', 'action' => 'activate', $userid); ?> The above works perfect except the fact that it is not the absolute URL $userid by the way is a raw parameter which I want to pass to an action Is there a way the above can be used to print out an absolu

Re: Fatal error Call to undefined method Controller Html()

2008-10-31 Thread Malcolm Krugger
Perfect Yes I have a component called Captcha Oh silly me ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this

Fatal error Call to undefined method Controller Html()

2008-10-31 Thread Malcolm Krugger
I have this var $helpers = array('Html', 'Form', 'Captcha'); and now when I use $this->Captcha->show(); IT works perfectly..No issues there but when I use something like $this->Html('title' , ''); The error given is Fatal error: Call to undefined method UsersController::Html() So what co

Re: 2 column layout for $form->input() ?

2008-10-07 Thread Malcolm Krugger
Here is a small example of a view file which shows one text box and 2 horizontal pull down menus in a form in a single horizontal line create('DataForm' );?> "; echo $form->input('numberone' , array('label' => false , 'type'=>'text','size' => '7

Warning: Configure include core.php configure include failed to open stream No such file or directory

2008-09-29 Thread Malcolm Krugger
This is somewhat related to http://groups.google.com/group/cake-php/browse_thread/thread/ea2bac4072e36cc6/c59d9cb45cf43a81?lnk=gst&q=Warning+Configure+include#c59d9cb45cf43a81 If you receive the following error Warning: Configure::include core.php configure.include failed to open stream: No suc

Re: 2 column layout for $form->input() ?

2008-09-09 Thread Malcolm Krugger
I needed all 3 form elements to display in a single horizontal line and here is my view template create('Data');?> input('numeral' , array('label' => false , 'type'=>'text','size' => '4', 'maxlength'=>'4' , 'style' => 'float: left; width: 30%; display:inline;' ,

Re: fatal error Cannot access empty property in view.php on line 744

2008-09-09 Thread Malcolm Krugger
Ok I found it var $helpers = array('Html', 'Form', ''); Changed to var $helpers = array('Html', 'Form'); and evertything as usual works like a charm Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePH

fatal error Cannot access empty property in view.php on line 744

2008-09-09 Thread Malcolm Krugger
Using the latest cake 1.2 version All was fine then one day suddenly I started receiving this error after I had freshly baked an application fatal error Cannot access empty property in view.php on line 744 What could be the cause of this strange error ? Malcom --~--~-~--~~

Re: Error: C:/xampp2/htdocs/test/cake/console\config\ not found

2008-09-09 Thread Malcolm Krugger
Toby Type in the full path of everything c:/full/path/to/php.exe c:/full/path/to/cakephp/cake/console/cake bake and it works like a charm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post

2 column layout for $form->input() ?

2008-08-18 Thread Malcolm Krugger
Whenever I user $form->input in templates invariably it outputs one below the other How do I make a 2 column form using $form->input tags ? Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To